calculating with time

Forums ProRealTime English forum ProBuilder support calculating with time

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

    Hello all,

    I want to make an indicator which is as follows: (((100- (number of periods since highest high))/100) * 100.

    However, I cannot translate the “number of periods since highest high” to prt code.

    Your help is much appreciated.

    Thank you very much.

    And best wishes,

    Geraldo

     

    #63405

    First you have to define the number of previous bars you want to scan to find a “highest high”.

    If you want the highest high of the last 100 bars you may write:

    At the end of which HighestHigh will hold the highest price found and HighestBar its bar ID, 0 to 100. So if it returns 23 you can reference that cadlestick with [23] (low[23], close[23,….).

     

     

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