This Indicator provoque a Crash on H4 charts

 
this Indicator provoque a crash error on Euro H4 charts although it does not on the H1 charts :

//+------------------------------------------------------------------+
//| You Better Play it - Long Or Short.mq4 |
//|
//| https://www.metaquotes.net/ |
//+------------------------------------------------------------------+
//#property copright "kalido"
#property link "https://www.metaquotes.net/
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red

//---- indicator parameters
extern int DaysPrd_toTest=5;
extern int Smoothing=3;
extern int Signal=5;
//---- indicator buffers
double ind_buffer1[];
double ind_buffer2[];
double ind_buffer3[];
double ind_buffer4[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
int max;
max = MathMax(DaysPrd_toTest,Smoothing);
max = MathMax(max,Signal);
//---- 1 additional buffers are used for counting.
IndicatorBuffers(4);
//---- drawing settings
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexDrawBegin(0,max);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexDrawBegin(1,max);

IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2);
//---- 3 indicator buffers mapping
if(!SetIndexBuffer(0,ind_buffer1) &&
!SetIndexBuffer(1,ind_buffer2) &&
!SetIndexBuffer(2,ind_buffer3) &&
!SetIndexBuffer(3,ind_buffer4)
) Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Better to Play("+DaysPrd_toTest+","+Smoothing+","+Signal+")");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Average of Oscillator |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- counted in the 1-st additional buffer
for(int i=0; i<limit-1; i++)
ind_buffer3[i]= -1 * ( (Low[i+1]- High[i]) + (High[i+1]- Low[i]) ) ;

//---- counted in the 2-nd additional buffer
for(i=0; i<limit-1; i++)
ind_buffer4[i]=iMAOnArray(ind_buffer3,Bars,Smoothing,0,MODE_SMMA,i);

//---- counted in the 3rd additional buffer
for(i=0; i<limit-1; i++)
ind_buffer1[i]=iMAOnArray(ind_buffer4,Bars,Signal,0,MODE_SMMA,i);

//---- counted in the 3rd additional buffer
for(i=0; i<limit-1; i++)
ind_buffer2[i]=iMAOnArray(ind_buffer1,Bars,Signal,0,MODE_SMMA,i);


//---- done
return(0);
}
//+------------------------------------------------------------------+
 
please use for source publishing pre tag!
 
hi,

what do you mean by : please use for source publishing pre tag! ( pre tag ?)

I am sorry to let the metaquotes.net mentionned in the indicator, by mistake.
the problem is I use a lot a copy past method in immiting the programs. things what is working I leave it.
so i miss to removing this from this indicator. any how it is made by me and not by metaquotes.net.

for so i have the problem.
Reason: