Download MetaTrader 5
To add comments, please log in or register
Start making profit using the Market. Publish your product!
chrisdk2015
70
chrisdk2015 2016.06.16 10:10 

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
6118
Carl Schreiber 2016.06.16 14:13  
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 2016.06.17 11:46  
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