MA ribbon – calculation error

Forums ProRealTime English forum ProBuilder support MA ribbon – calculation error

Viewing 3 posts - 1 through 3 (of 3 total)
  • #117983

    I know PRT has an in-built Moving Average Ribbon indicator, but you can’t define the MA type (strange of them not to think of including that), nor can you make the respective MAs Volume-adjusted, i.e. VWAP. So I tried to do it myself. The code below is simple enough and looks right, but results in a peculiar calculation error. Can anyone figure it out? I’m stuck. Thanks in advance.

    Variables are: UseVolumeAdjusted = true (Boolean); MAtype = 1 (Exponential); BasePeriod = 8; PeriodIncrement = 2.

     

    1 user thanked author for this post.
    #117987

    It works with no error, if you include the calculation into a global condition checking if there is enough bars loaded.

     

    1 user thanked author for this post.
    #117989

    Ah I see, thank you.

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

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