Add multiple moving averages in one go to a chart?

Forums ProRealTime English forum ProBuilder support Add multiple moving averages in one go to a chart?

Viewing 2 posts - 1 through 2 (of 2 total)
  • #52508

    Hi,

    I’m trying to write and indicator which will, for example, add 30 moving averages to a chart in sequence from 1 to 30 but I’m not quite how to code this.

    Can someone please help? My attempt below obviously doesn’t like the RETURN statement in the FOR NEXT loop.

    Thanks

    Rob

     

    #52682

    There are some limitations because of the “infinite loop” error, but this kind of code could make the trick:

    Because, it is not possible to draw curve in the past, I used segments instead. You can choose the MA’s first period to last period to be plotted. First time I made a Guppy / Fishnet indicator like this 🙂

    2 users thanked author for this post.
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