Download MetaTrader 5

SMA of ATR in mql4

To add comments, please log in or register
chrisdk2015
70
chrisdk2015  

Hi,

I have tried to find a solution to the way of calculating SMA of ATR in mql4.

Obviously you can do this in the chart: apply a moving average to ATR but how to do this in mql?

Thanks. 

Carl Schreiber
7224
Carl Schreiber  
chrisdk2015:

Hi,

I have tried to find a solution to the way of calculating SMA of ATR in mql4.

Obviously you can do this in the chart: apply a moving average to ATR but how to do this in mql?

Thanks. 

1) The Atr (incl. the built in iAtr()) is already an exponential moving average - do you need an sma of an ema - what about increasing the given Periods?

2) Calculate the Atr yourself and create an sma of that yourself.

3) Maybe before starting to code just read the what the editor's reference tells about about iAtr()?

chrisdk2015
70
chrisdk2015  
Carl Schreiber:

1) The Atr (incl. the built in iAtr()) is already an exponential moving average - do you need an sma of an ema - what about increasing the given Periods?

2) Calculate the Atr yourself and create an sma of that yourself.

3) Maybe before starting to code just read the what the editor's reference tells about about iAtr()?

Thanks,

Increasing period length of ATR I can use that instead of an SMA.

To add comments, please log in or register