Indicator for Prior Day High, Low, Close

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41018 quote
    RingoRingo
    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Ʃ

    HLC.png HLC.png
    #41050 quote
    NicolasNicolas
    Keymaster
    Legend

    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
    RingoRingo
    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
    RingoRingo
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTimeā„¢ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Indicator for Prior Day High, Low, Close


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Ringo @ringo Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by RingoRingo
9 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/18/2017
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...