Indicator for Prior Day High, Low, Close

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41018 quote
    Ringo
    Participant
    Junior

    Hello,

    I work in my intraday charts with an indicator, which gives me the results for the prior day high, low and close for the US Stocks main trading session (15:30-22:00 Berlin Time).

    To get the right close, I restricted by the time (22:00) which works correct so far.

    But I need a solution, that the indicator shows me the correct high and low of the main trading session.

    At the moment, it shows me the high and low of the prior day , but he does not care about, if it is made in the pre opening sessions or in the main trading session.

    Is there a way to restrict it like: give me the highest and lowest price between a time space 15:30 and 22:00?

    (It should work in every time frame, so I can not go over the highest high/lowest low, regarding a specific number of candles/periods)

    Thanks a lot for help,

    Regards André

    #41050 quote
    Nicolas
    Keymaster
    Master

    Hey Ringo, please post the code in text format with the appropriate button, it would be much easier to copy/paste the code into our platforms in order to try to do something with it 🙂 Thank you.

    #41059 quote
    Ringo
    Participant
    Junior

    Hey Nicolas,

    ok here we go.

    // Open/High/Low/Close Vortag
    defparam drawonlastbaronly = true
    
    HighVT = DHigh(1)
    LowVT = DLow(1)
    IF TIME =220000 AND date=yesterday THEN
    CloseVT = Close
    Endif
    
    //vertical offset to draw text correctly over horizontal lines
    Voffset = 0*pipsize
    
    //draw Open/High/Low/Close Vortag Text
    DRAWTEXT("VT-Close",barindex-54,CloseVT+Voffset,SansSerif,Standard,10)coloured(153,51,255)
    DRAWTEXT("VT-Hoch",barindex-54,HighVT+Voffset,SansSerif,Standard,10)coloured(0,204,51)
    DRAWTEXT("VT-Tief",barindex-54,LowVT+Voffset,SansSerif,Standard,10)coloured(0,204,51)
    
    //draw Open/High/Low/Close Vortag lines without extensions
    DRAWSEGMENT(barindex-50,CloseVT,barindex,CloseVT) coloured(153,51,255)
    DRAWSEGMENT(barindex-50,HighVT,barindex,HighVT) coloured(0,204,51)
    DRAWSEGMENT(barindex-50,LowVT,barindex,LowVT) coloured(0,204,51)
    
    RETURN
    #42468 quote
    Ringo
    Participant
    Junior

    Has anybody an idea?

    Thanks for help

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Indicator for Prior Day High, Low, Close


ProBuilder support

New Reply
Author
author-avatar
Ringo @ringo Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Ringo
8 years, 5 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 07/18/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...