Smoothing ATR. HELP!?
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 indicatorAlso remember the Average in ATR is SMA in mql4. The original formula was EMA.
Thank You. That answered my questions.
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