Highest/lowest code

Forums ProRealTime English forum ProBuilder support Highest/lowest code

Viewing 7 posts - 1 through 7 (of 7 total)
  • #54518

    Hi

    I know we can use highest https://www.prorealcode.com/documentation/highest/ and lowest https://www.prorealcode.com/documentation/lowest/  but does anyone have the code behind these please?

    Thanks

    Rob

    #54524

    Roberto

    1 user thanked author for this post.
    #54533

    Hi Roberto,

    Many thanks

    It’s close but not quite there. How could you apply this to the close like the PRT indicators are https://www.prorealcode.com/documentation/highest/

    Thanks again,

    Robert

    #54544

    Replace line 8 with:

     

    1 user thanked author for this post.
    #54556

    Hi Roberto

    Close does the job but how do I reverse this to get lowest please?

    Many thanks for you help.

    Thanks again

    Robert

    #54565

    // 20-period LOWEST
    //
    // This is not the official PRT code, but it shouldn’t be much different
    //
    Periods         = 20
    LowestPrice = 999999
    FOR i = 0 TO (Periods – 1)
    LowestPrice = Min(close[i],LowestPrice)
    NEXT

    1 user thanked author for this post.
    #54596

    Many thanks Roberto, gives exactly the same results as the PRT code so thank you again.

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

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