ACCUMULATED DIFFERENCE

Forums ProRealTime English forum ProBuilder support ACCUMULATED DIFFERENCE

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

    HI. Need help returning the value “D”.

    I am trying to compare todays close with yesterdays for a specific hour, in this case 21000. Then I want to accumulate the difference over time, “D”, with a start value of 100, “ONCE D=100”. But the code will only return the value “100” for “D” and not adding the movement per day.

    ONCE D=100
    IF TIME=210000 THEN
    C=CLOSE
    A=(C-C[1])/C[1]//percent movement per day
    B=D*A//Value movment per day
    D=D+B//Accumulated value over time
    ENDIF

    RETURN A*100 AS “PROCENT”, B AS “VALUE”, D AS “ACCUMULATE”

    #225208

    Try this one:

     

    #225211

    Thank you but it does not work. Will only show “A” now. Did you try it your self?

    Problem it self is probably D=D+B where B should be a fixed value, then it works…

    #225212

    Also, I do only want the 24 hour difference, and not hour by hour: I do want to compare one specific hour with the same hour the day before and then accumulate that difference

    #225543

    The problem is that we also need to define C on the first candlestick, an example of a quick correction:

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