Zero lag moving average

Forums ProRealTime English forum ProBuilder support Zero lag moving average

  • This topic has 1 reply, 2 voices, and was last updated 6 years ago by avatarLeo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #68211

    Hey guys!

    I found a code for zero lag moving average, but i need another moving average, and cant figure out how to add it, since it keeps getting errors.
    I’d like to add another longer period moving average with zero lag ofcourse.

    This is the code that got 1 moving average:

     

    //ZeroLag Fast MA:
    PeriodF = 8
    DataF = Close
    lagF = ROUND((PeriodF-1)/2)
    dF = (DataF+(DataF-DataF[lagF]))
    F = average[periodF](dF)

    RETURN F

     

     

    Thanks for help! 🙂

    #68224
    Leo

    Error? I just copy paste your code and it works.

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

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