Line on Chart after the 16:30 trading day

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #222055 quote
    oyinloyea
    Participant
    Veteran

    Please help with putting a horizontal  line using the closing price at 16:30 on my chart to show on the new trading day

    #222067 quote
    JS
    Participant
    Senior

    Hi,

    When you mean a vertical line:

    DefParam DrawOnLastBarOnly=True
    TimeFrame(30 minutes)
    If OpenTime=163000 then
    xBar=BarIndex
    EndIf
    DrawVLine(xBar)Coloured("Red")
    Return
    oyinloyea thanked this post
    #222097 quote
    oyinloyea
    Participant
    Veteran
    Thanks for your help. I need a horizontal line instead of a vertical line
    Watanabix thanked this post
    #222098 quote
    JS
    Participant
    Senior
    Hi,

    The horizontal line starts at 16:30 on the “Open” and runs up to the “BarIndex”…  

    DefParam DrawOnLastBarOnly=True
    TimeFrame(30 minutes)
    If OpenTime=163000 then
    xBar=BarIndex
    xOpen=Open
    EndIf
    DrawSegment(xBar,xOpen,BarIndex,xOpen)Coloured("Red")
    Return

    Andre36, Bel and Watanabix thanked this post
    #239811 quote
    Bel
    Participant
    New
    On the same note, does the code get a lot more complicated if I want that line to get cut off when it hits price action? Say a close of 16:30(using close instead open), line extended to the future, using drawline or drawray and once its hit with price it stops drawing. I have been busting my balls to get around this and still can’t find a reasonable decision. All tips welcome. Thank you.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Line on Chart after the 16:30 trading day


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
oyinloyea @oyinloyea Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Bel
1 year, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/05/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...