How to add or subtract an indicator value from itself

Forums ProRealTime English forum ProBuilder support How to add or subtract an indicator value from itself

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

    Good morning to everybody, I need a little help to understand the algorithm construction process in probuilder of the following indicators examples.

    How to subtract or add to an indicator value, the value of the previous period (yesterday’s indicator value).

    For example the PVT:

    %var = (close – yesterday’s close) / (yesterday’s close)

    PVT = %var * today’s volume + yesterday’s PVT

    Or the Williams acc/distr.

    TRH = the highest of (yesterday’s close or today’s high)

    TRL = the smallest of (yesterday’s close or today’s low)

    If the today’s close > yesterday’s close then A/D = today’s close – TRL

    if the today’s close < the yesterday’s close then A/D = today’s close – TRH

    If the today’s close = yesterday’s close then A/D = 0

    A/D William = today’s A/D + yesterday’s A/D William

    Thanks so much

     

    Max

     

    #65951

    For example the PVT:

         %var = (close – yesterday’s close) / (yesterday’s close)                                       //—>        VarPercent = (close – close[1]) / close[1]

         PVT = %var * today’s volume + yesterday’s PVT                                              //—>        Pvt = VarPercent * Vol + Pvt[1]

    Or the Williams acc/distr.

    TRH = the highest of (yesterday’s close or today’s high)                                     //—>        Trh = Max(close[1], high)

    TRL = the smallest of (yesterday’s close or today’s low)                                     //—>         Trl = Min(close[1],low)

    If the today’s close > yesterday’s close then A/D = today’s close – TRL          //—>         if close > close[1] then AD = close  – Trl

    if the today’s close < the yesterday’s close then A/D = today’s close – TRH  //—>          if close < close[1] then AD = close – Trh

    If the today’s close = yesterday’s close then A/D = 0                                          //—>          if close = close[1] then AD = 0

    A/D William = today’s A/D + yesterday’s A/D William                              //—>          AD = AD + AD[1]

    #66025

    Thanks Roberto, yes the PVT works, but the Williams AD doesn’t.

    I tried but it doesn’t give me any result, could you check please, maybe I’m making some mistakes.

    Thanks a lot, Max

     

    #66034

    I do not know what lines 4, 6 and 8 do, so I can not tell you if they are good or not. I told you the syntax to do it, but what’s behind the A / D William just do not know!

    (translated from Italian to English by Nicolas).

    #66367

    Hi Roberto, I have resolved it….

    I have replaced line 10 :

    AD = AD + AD[1]

    with

    WAD = CUMSUM (AD)

    cumulative instruction “cumsum” in the end of the formula.

    Max

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