investguy:
Your TempBuffer is not ATR(480) it is ATR(1) . . . I think, Technical Indicators aren't my thing.
Hello,
I have been trying to smooth ATR like i did applying the EMA 128 on the ATR 480[1st indicator window]. Here is my code for the ATR indicator on the last window[2nd indicator window].
They should have the same results. What am i doing wrong?
RaptorUK: Your TempBuffer is not ATR(480) it is ATR(1)
- Exactly.
ATR(1) TempBuffer[i]=MathMax(high,prevclose)-MathMin(low,prevclose);
Try TempBuffer[i]= iATR(NULL,0, AtrPeriod, i);
// this is the original true-range formula for the MQL4 ATR indicator
Also remember the Average in ATR is SMA in mql4. The original formula was EMA.
Thank You. That answered my questions.
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
Hello,
I have been trying to smooth ATR like i did applying the EMA 128 on the ATR 480[1st indicator window]. Here is my code for the ATR indicator on the last window[2nd indicator window].
They should have the same results. What am i doing wrong?
Thank You in advance