Marking highs and lows based on opening and closing prices.

Forums ProRealTime English forum ProBuilder support Marking highs and lows based on opening and closing prices.

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

    Hi,

    Do you have any ideas on how to mark the high and low of a time range, e.g., 8 a.m. to 12 p.m., on the chart?

    It is important that the highs and lows are marked only on the basis of the candle bodies, i.e., without wicks and shadows. I wrote it once on a closing price basis. However, it is sometimes the case that the opening prices mark the lower or upper end, and then the line is not correct.

     

    // Dailyreset
    IF Day <> Day[1] THEN
    hiClose = Close
    loClose = Close
    ENDIF

    // Collecting only between 08:00 and 14:30
    IF Time >= 080000 AND Time <= 143000 THEN
    hiClose = MAX(hiClose, Close)
    loClose = MIN(loClose, Close)
    ENDIF

    // Drawing Line from 14:30
    IF Time >= 143000 THEN
    DRAWSEGMENT(barindex, hiClose, barindex + 1, hiClose) COLOURED(165,42,42)style(dottedline, 3)
    DRAWSEGMENT(barindex, loClose, barindex + 1, loClose) COLOURED(165,42,42)style(dottedline, 3)
    ENDIF

     

     

     

    #254720

    There you go:

     

    1 user thanked author for this post.
    #254722

    Please select the correct language. I moved it from the German forum. Thanks 🙂

     

    #254723

    Hi Roberto,

    I probably didn’t express myself clearly.

    However, the formula you showed only depicts the range in the period shown on a close basis.

    In the image, you can see that the range would be higher if you also wanted to use the open (high, low).

    In other words, I want to see the lowest price and the highest price of all candlesticks in the period. I don’t know how to include the open price in the calculation.

     

    #254725

    i mean, highest and lowest price on basis of candelstick-bodies.

    #254726
    #254727

    That’s it – many thanks Roberto 🙂

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