I have Problem in changing input data in my indicator

 

hi, I wrote a indicator that use two iMAs. in my indicator I used an if that compare this two iMAs and point some price. my indicator work well in first run, but after I changed my inputs it shows strange things. 

 

plz help me

Files:
SMA21-5.mq5  14 kb
 
arman1986:

hi, I wrote a indicator that use two iMAs. in my indicator I used an if that compare this two iMAs and point some price. my indicator work well in first run, but after I changed my inputs it shows strange things. 

 

plz help me

Deal with the indicator buffers. To advertise the properties of buffers to sequentially: №0, №1, №2 etc.

   SetIndexBuffer(0,ExtMapBufferCeiling,INDICATOR_DATA);
   SetIndexBuffer(1,ExtMapBufferEMA,INDICATOR_DATA);
   SetIndexBuffer(2,ExtMapBufferFloor,INDICATOR_DATA);

   PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,MAPeriod);
   PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,MAPeriod);
   PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,MAPeriod);
 
   PlotIndexSetInteger(0,PLOT_SHIFT,MAShift);
   PlotIndexSetInteger(1,PLOT_SHIFT,MAShift);
   PlotIndexSetInteger(2,PLOT_SHIFT,MAShift);
 
barabashkakvn:

Deal with the indicator buffers. To advertise the properties of buffers to sequentially: №0, №1, №2 etc.

It couldn't help me! 

plz take a look to my program and see what is my problem, I stuck so badly!

 
arman1986:

It couldn't help me! 

plz take a look to my program and see what is my problem, I stuck so badly!

See Jobs service.