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
    Master

    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
    Scherm­afbeelding-2023-10-05-om-18.27.41.png Scherm­afbeelding-2023-10-05-om-18.27.41.png
    #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
    Master
    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
    Scherm­afbeelding-2023-10-06-om-13.16.01.png Scherm­afbeelding-2023-10-06-om-13.16.01.png
    #239811 quote
    Bel
    Participant
    Veteran
    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.
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

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, 10 months ago.

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