Download MetaTrader 5
To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
Carl Schreiber
5966
Carl Schreiber 2014.10.07 07:59 

Hi,

after I wasn't able to eliminate some differences I had closer look at iMaOnArray and I programmed a simple example.

I created a buffer (sma(n)-sma(2n)) and let iMaOnArray create another sma(2) which I calculated my self too and displayed the result on the chart:

1) See the big difference of the candle[3] with the biggest body.

2) Watch the Bar[0] while 'my' average of [0] and [1] changes at every new tick iMaOnArray does change at all it keeps its value based on Open[0] of the bar.

I attached this indicator so you can check yourself - the service desk hasn't answered yet, and may be I just misunderstand the idea of iMaOnArray(..).

Wait for some big bars and use M1-chart for faster results.

Gooly

Files:
Alain Verleyen
Moderator
28701
Alain Verleyen 2014.10.07 09:29  
   for (i=limit-1;i>=0;i--){
      FastBuff[i] = (iMAOnArray(MaBuff,0,MaMa_PerFast,0,MaMa_Method,i));
      SlowBuff[i] = (iMAOnArray(MaBuff,0,MaMa_PerSlow,0,MaMa_Method,i)); 
   }
Carl Schreiber
5966
Carl Schreiber 2014.10.07 10:45  

Ahh - thank you, that's it.

That's the result if you trust unchecked commercially propagated indicators!

Thanks again!!

Gooly

/
To add comments, please log in or register