MT4 ATR indicator replication. Please Help! New comment Cloud Lee 2021.01.11 10:09 Hello, I would like to replicate MT 4 ATR value in the other platform.. but it's not easy to do AFAIK, ATR[i] = ATR[i-1] + ( TR[i] - TR[i-n] ) / n; // n is the ATR period is the formula. I do not understand that there are two different figures, i and n. If I want to calculate ATR for 20 candles, wouldn't this be ATR[20] = ATR[20 - 1] + (TR[20] - TR[20-20]) / 20. So is it an ATR indicator based upon other ATR?? If there is no ATR calculated before, how can I place an ATR[20 -1]? What am I missing? Please help! ATR formula used in MT4 indicator is not original ATR Calculation - MQL ATR Trailing Stop New comment
Hello,
I would like to replicate MT 4 ATR value in the other platform.. but it's not easy to do
AFAIK, ATR[i] = ATR[i-1] + ( TR[i] - TR[i-n] ) / n; // n is the ATR period is the formula.
I do not understand that there are two different figures, i and n. If I want to calculate ATR for 20 candles, wouldn't this be
ATR[20] = ATR[20 - 1] + (TR[20] - TR[20-20]) / 20. So is it an ATR indicator based upon other ATR??
If there is no ATR calculated before, how can I place an ATR[20 -1]?
What am I missing? Please help!