how do i calculate the value of an indicator on Nth previous bar?

Forums ProRealTime English forum ProOrder support how do i calculate the value of an indicator on Nth previous bar?

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

    hello again

    I was wondering if any of the programming wizards could help with some simple code…

    I would like to calculate the value of an indicator (ATR) on a previous bar so that I can potentially open positions if the volatility is rising…  I was thinking of using just 2 bars for this.  This will act somewhat like a filter.

    Simply put:  if after 2 bars the volatility is rising based on the ATR value, then I will look to open a position on the 3 bar (using a trigger from a lower time-frame).  I hope this makes sense.

    Kind Regards

    Jim

    #175719

    Simply use [N] to refer to the previous Nth bar.

    1 user thanked author for this post.
    #175762

    thanks again Roberto!

     

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