stangoesagain:
iATR: https://www.metatrader5.com/en/terminal/help/indicators/oscillators/atr and source: https://www.mql5.com/en/code/7807
There are several topics on this already but they usually explain differences in ATR values between various trading platforms, I can't get the correct values with MT4's own downloaded data.
I saved MT4 chart as .csv file and calculated ATR according to rules on this page: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_true_range_a
Then I compared the result with the data shown on the chart itself, OHLC values are exactly the same, MT4 shows first ATR value for day 16 (I'm calculating 15-day ATR) and it's different. I've even tried to calculate exponential moving average but still no luck.
- MT4 uses SMA( tr )
- Some platforms use EMA( tr )
- Your http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_true_range_a specifies
Current ATR = [(Prior ATR x 13) + Current TR] / 14which is an MMA (Modified moving average) An alpha of 1/n (1/14) corresponds to a EMA (exponential moving average) of period = 2n - 1 (27)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
There are several topics on this already but they usually explain differences in ATR values between various trading platforms, I can't get the correct values with MT4's own downloaded data.
I saved MT4 chart as .csv file and calculated ATR according to rules on this page: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_true_range_a
Then I compared the result with the data shown on the chart itself, OHLC values are exactly the same, MT4 shows first ATR value for day 16 (I'm calculating 15-day ATR) and it's different. I've even tried to calculate exponential moving average but still no luck.
You can check all the numbers and formulas here, ATR values from MT4 I entered manually
https://docs.google.com/spreadsheet/ccc?key=0Aq6BoCDk6eoWdElfUXpXMWItbllybkI5X19UOFJ6c1E&usp=sharing
I've made that document editable, feel free to correct anything that is wrong, but probably create a separate sheet for any massive editing.