#property copyright "me" #property link "http://www.mql5.com" #property version "1.00" #property strict #property indicator_chart_window extern int Bollinger_Open = 5; // Declaring arrays (for indicator buffers) double Array_uBB[], Array_lBB[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping SetIndexBuffer(0,Array_uBB); SetIndexStyle (0,DRAW_ARROW,STYLE_SOLID,1,Blue); SetIndexArrow(0,225); SetIndexBuffer(1,Array_lBB); SetIndexStyle (1,DRAW_ARROW,STYLE_SOLID,1,Blue); SetIndexArrow(1,226); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //--- int limit; int counted_bars = IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) return(-1); if(counted_bars<1) counted_bars=1; limit = Bars-counted_bars; Comment("rec. Amount of Candles: ",Bars," counted Bars: ",counted_bars," Limit: ",limit); for(int i=0;iBollinger_Open && (lBB_1-lBB_0)*10000>Bollinger_Open) { Array_uBB[i] = uBB_0; Array_lBB[i] = lBB_0; } } return(0); } //+------------------------------------------------------------------+