Daily ATR

Viewing 5 posts - 1 through 5 (of 5 total)
  • #47002

    How to I code a DAILY ATR to use on intraday charts. I have tried thw following but it does not give me a single value for the day as I was expecting it would.

    tr1 = ABS(DHigh(1) – DLow(1))
    tr2 = ABS(DHigh(1) – DClose(2))
    tr3 = ABS(DLow(1) – DClose(2))

    TrueRange = wilderaverage[14](max(abs(Dhigh(i)-Dlow(i)),max(abs(Dhigh(i)-Dclose(i+1)),abs(Dlow(i)-Dclose(i+1)))))

    #47007

    Sorry posted the wrong second half of the formula.

     

    tr1 = ABS(DHigh(1) – DLow(1))
    tr2 = ABS(DHigh(1) – DClose(2))
    tr3 = ABS(DLow(1) – DClose(2))

    TrueRange = wilderaverage[14](Max(MAX(tr1,tr2),MAX(tr2,tr3)))

    #47023

    Check if you get the close that you think you do. Depending on which security you use this for the close might be in the middle of the night.

    #47218

    I already coded something around the Daily ATR calculation on an intraday timeframe, this is an example: https://www.prorealcode.com/prorealtime-indicators/daily-atr-range-for-intraday-chart/

    #47257

    Thanks Nicolas and Despair.

    I am trying to put this into a Trading System, and cannot get it to work. The code returns a value for the current day, but I need a value for every day going back, and can’t see what to do.

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login