//+------------------------------------------------------------------+ //| Keltner Chanel.mq4 | //| Korey | //| ekr-ap@mail.ru | //+------------------------------------------------------------------+ #property copyright "AP" #property link "ekr-ap@mail.ru" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Red #property indicator_color3 Red extern int periodMA=20; //Basic EMA extern int periodATR=10;//Average True Range period extern double kshift=2; //shift Lines Upper & Lower double b0[],b1[],b2[]; int init() { SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,b0); SetIndexLabel(0,"Upper"+periodATR+","+DoubleToStr(kshift,1)); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,b1); SetIndexLabel(1,"Lower"+periodATR+","+DoubleToStr(kshift,1)); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,b2); SetIndexLabel(2,"EMA"+periodMA); IndicatorShortName("Keltner_Chanel("+periodMA+","+periodATR+","+DoubleToStr(kshift,1)+")"); return(0); } int start() { int i,limit=Bars-periodMA-IndicatorCounted(); double r; for(i=0;i