//+------------------------------------------------------------------+
#property copyright "ë¸êñóñ"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Aqua
#property indicator_color2 Violet
double Up[],Dn[];
//+------------------------------------------------------------------+
int init()
{
SetIndexBuffer(0,Up);
SetIndexBuffer(1,Dn);
SetIndexStyle(0,DRAW_ARROW);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(0,233);
SetIndexArrow(1,234);
return(0);
}
//+------------------------------------------------------------------+
int start()
{
int i,CountBars=Bars-1;
for(i=0; i<CountBars; i++)
{
Up[i]=0.0; Dn[i]=0.0;
if(Close[i+1]>Open[i+1] && Close[i+2]<Open[i+2] && Close[i+1]>Open[i+2] && Open[i+1]<=Close[i+2]) { Up[i]= Low[i+2]; }
if(Close[i+1]<Open[i+1] && Close[i+2]>Open[i+2] && Close[i+1]<Open[i+2] && Open[i+1]>=Close[i+2]) { Dn[i]=High[i+2]; }
}
return(0);
}
//+------------------------------------------------------------------+
int deinit() { return(0); }
//+------------------------------------------------------------------+
Comments