Please help with putting a horizontal line using the closing price at 16:30 on my chart to show on the new trading day
JSParticipant
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
Thanks for your help. I need a horizontal line instead of a vertical line
JSParticipant
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
BelParticipant
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.