//+------------------------------------------------------------------+ //| ytg_Day_Channel.mq4 | //| Yuriy Tokman (YTG) | //| http://www.mql-design.ru | //+------------------------------------------------------------------+ #property copyright "Yuriy Tokman (YTG)" #property link "http://www.mql-design.ru" #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Lime #property indicator_color2 Red #property indicator_width1 2 #property indicator_width2 2 extern int bars_limit = 5000; extern string __________________ = "_________________________"; extern string Copyright = "Yuriy Tokman"; extern string ÏÈØÓ_ÍÀ_ÇÀÊÀÇ_ÝÊÑÏÅÐÒÛ = "ÈÍÄÈÊÀÒÎÐÛ_ÑÊÐÈÏÒÛ"; extern string e_mail = "yuriytokman@gmail.com"; extern string Skype = "yuriy.t.g"; double B0[]; double B1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,B0); SetIndexLabel(0,"UP"); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,B1); SetIndexLabel(1,"DN"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- double h,l,c; double _h,_l,_c; double h0,l0,c0; int limit;int b; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; if(limit>bars_limit)limit=bars_limit; for(int i=0; ih || l0