//+------------------------------------------------------------------+ //| Candle.mq4 | //| Kvant | //+------------------------------------------------------------------+ #property copyright "1" #property link "i-DarkCloud-Piersing" #property indicator_chart_window #property indicator_color1 White #property indicator_color2 White #property indicator_buffers 2 double ExtHistoBuffer[]; double ExtHistoBuffer2[]; //----------------------------------------------------------------+ int init() { SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID); SetIndexBuffer(0, ExtHistoBuffer); SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID); SetIndexBuffer(1, ExtHistoBuffer2); SetIndexArrow(1,241);//233 SetIndexArrow(0,242);//234 return(0); } void start() { ExtHistoBuffer[0] = EMPTY_VALUE; ExtHistoBuffer2[0] = EMPTY_VALUE; int counted = IndicatorCounted(); if (counted < 0) return (-1); if (counted > 0) counted--; int limit = Bars-counted; for (int i=limit; i >= 0; i--) { if ((Close[i+1]>Open[i+1]) && ((Open[i]>Close[i+1]) || (High[i]>High[i+1])) && (Close[i]Open[i]) && ((Open[i]Close[i+1]+((Open[i+1]-Close[i+1])/2))) ExtHistoBuffer2[i] = Low[i]-45*Point; } }