#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
double val1[];
double val2[];
int init()
{
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW,EMPTY,1);
SetIndexArrow(0,241);
SetIndexStyle(1,DRAW_ARROW,EMPTY,1);
SetIndexArrow(1,242);
SetIndexBuffer(0,val1);
SetIndexLabel(0,"UP!");
SetIndexBuffer(1,val2);
SetIndexLabel(1,"DOWN!");
//---
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int limit, counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars-1;
for (int i = limit; i>=0; i--)
{
val1[i]=0;val2[i]=0;
if (Low[i]<Low[i+2] && Low[i+1]>Low[i+2] && High[i+1]<High[i+2] && Close[i]>Low[i+1] && Close[i]<High[i+1])
{
val1[i]=Low[i]-50*Point;
}
if (High[i]>High[i+2] && Low[i+1]>Low[i+2] && High[i+1]<High[i+2] && Close[i]>Low[i+1] && Close[i]<High[i+1])
{
val2[i]=High[i]+50*Point;
}
}
return(0);
}

double fibo[]={0,0.382,0.618,1,1.618,2.618,1.27,1.382,-0.27,-0.382,1.1,-0.1,-1,2,0.333,0.431,0.569,0.667,1.854,2.854,0.1,0.9,-0.618,-1.618,-0.854,-1.854,2.528,2.146};
Bishop