#property copyright "Copyright © 2014 Serkov Alexandr" #property link "serkov-alexandr@mail.ru" //+------------------------------------------------------------------+ //| Properties | //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Red #property indicator_width1 3 #property indicator_width2 3 extern int N=10; double Buf1[]; double Buf2[]; //+------------------------------------------------------------------+ //| Initialization | //+------------------------------------------------------------------+ int init() {SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexDrawBegin(1,1); IndicatorDigits(Digits+1); SetIndexBuffer(0,Buf1); SetIndexBuffer(1,Buf2); if(N<=0) N=3; return(0);} //+------------------------------------------------------------------+ //| Main function | //+------------------------------------------------------------------+ int start() {int i;bool dir; for(i=Bars-2*N;i>=0;i--) {if(High[i]>High[i+N]) dir=true; if(Low[i]