Author: Copyright � 2007, modulatum.
hikkake
Price Data Components
Series array that contains the highest prices of each barSeries array that contains the lowest prices of each barSeries array that contains close prices for each bar
Miscellaneous
It issuies visual alerts to the screen
0 Views
0 Downloads
0 Favorites
hikkake
//Hikkake Pattern Indicator
#property copyright "Copyright © 2007, modulatum."
#property indicator_chart_window
int buy = 0, sell = 0, i = 0;
extern int minutes;
int init()
  {

   return(0);
  }
  
  int deinit(){
  ObjectsDeleteAll(0,0);
  return(0);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  double bar0H = iHigh(NULL,minutes,2);
  double bar1H = iHigh(NULL,minutes,1);
  double bar2H = iHigh(NULL,minutes,0);
  double bar0L = iLow(NULL,minutes,2);
  double bar1L = iLow(NULL,minutes,1);
  double bar2L = iLow(NULL,minutes,0);
  double bar0C = iClose(NULL,minutes,2);
  double bar1C = iClose(NULL,minutes,1);
  double bar2C = iClose(NULL,minutes,0);
  double bar1R = MathAbs(bar1H - bar1L);
  double bar0R = MathAbs(bar0H - bar0L);
  
  if(bar1L >= bar0L && bar1H <= bar0H){
   if(bar2H > bar1H && bar2L > bar1L && sell == 0){
      sell = 1;
      buy = 0;
      i = i + 1;
      ObjectCreate("H Sell " + minutes + " " +i,0,0,TimeCurrent(),Close[0]);
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_COLOR,Red);
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_WIDTH,1); 
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_STYLE,STYLE_SOLID);
      Alert("Sell " + Symbol() + " ("+minutes+") (Hikkake)");
		//bear;
	}
	if(bar2H < bar1H && bar2L < bar1L && buy == 0){
	sell = 0;
      buy = 1;
      i = i + 1;
            ObjectCreate("H Buy" + minutes + " " +i,0,0,TimeCurrent(),Close[0]);
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_COLOR,YellowGreen);
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_WIDTH,1); 
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_STYLE,STYLE_SOLID);
      Alert("Buy " + Symbol() + " ("+minutes+") (Hikkake)");
		//bull;
	}
	
	
		if(bar2H < bar1H && bar2L < bar1L && buy == 0 && bar1C == bar1L && bar1R < bar0R){
	sell = 0;
      buy = 1;
      i = i + 1;
            ObjectCreate("H Buy" + minutes + " " +i,0,0,TimeCurrent(),Close[0]);
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_COLOR,YellowGreen);
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_WIDTH,1); 
      ObjectSet("H Buy" + minutes + " " +i,OBJPROP_STYLE,STYLE_SOLID);
      Alert("Reversal Buy " + Symbol() + " ("+minutes+") (Hikkake)");
		//bull;
	}
	if(bar2H > bar1H && bar2L > bar1L && sell == 0 && bar1C == bar1H && bar1R < bar0R){
      sell = 1;
      buy = 0;
      i = i + 1;
      ObjectCreate("H Sell " + minutes + " " +i,0,0,TimeCurrent(),Close[0]);
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_COLOR,Red);
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_WIDTH,1); 
      ObjectSet("H Sell" + minutes + " " +i,OBJPROP_STYLE,STYLE_SOLID);
      Alert("Reversal Sell " + Symbol() + " ("+minutes+") (Hikkake)");
		//bear;
	}
	
  }
           
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---