Find the maxium of the 4 15min bars of the previous day

Forums ProRealTime English forum ProBuilder support Find the maxium of the 4 15min bars of the previous day

Viewing 5 posts - 1 through 5 (of 5 total)
  • #222408

    Hey,

    I want to find the maximum of the 15 minute bars from 16:30 to 17:15 of the previous day. For the current day I am using this code:

    if OpenTime=171500 then
    SessionHigh=Highest[4](high)
    SessionLow=Lowest[4](low)
    endif

    How it is done for the same time period but for the previous day?

     

    Thanks in advance for your kind help!

     

    John

    #222413

    There you go:

    SessionHighPrev and SessionLowPrev will retain the previous day’s data.

    1 user thanked author for this post.
    #222421

    It worked, thank you!

    #222422

    Hey again,

    so I have this code:

    if OpenTime=171500 then
       SessionHighPrev=SessionHigh
       SessionLowPrev=SessionLow
       SessionHigh=Highest[4](high)
       SessionLow=Lowest[4](low)
    endif
    return SessionHighPrev
    that updates the line on the chart at 17:15.
    But I want the line to be updated on the chart at a different time, lets say at 09:00 in the morning. Note that I still want the line to be calculated at 17:15.
    I tried to put return inside an if statement but prorealcode doesn’t accept that.

     

    Can you help me please?

    John

    #222434

    There you go:

     

    1 user thanked author for this post.
Viewing 5 posts - 1 through 5 (of 5 total)

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