Draw a Vertical Line at midnight

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #213628 quote
    Kole96
    Participant
    New

    Hello everyone, can someone help me to code to draw a Vertical Line et midnight New york Time?

    Thank you

    i found a code in Tradingview if it can help

     

    study("New York Midnight", overlay=true, scale=scale.none)
    
    cond =  time(timeframe.period, "0000-0001")
    
    cond_1 = time('240', "0000-0000:1") and timeframe.period=="240"
    
    plot(cond_1 ? 10e20 : na, style=plot.style_histogram)
    plot(cond ? 10e20 : na, style=plot.style_histogram)
    #213633 quote
    robertogozzi
    Moderator
    Master

    There you go (EU is UTC+2, NY is UTC-4, it’s a 6-hour difference):

    IF (OpenTime = 060000) OR ((OpenTime > 060000) AND (OpenTime[1] < 060000)) THEN
       DrawVline(BarIndex)
    ENDIF
    RETURN
    #213640 quote
    Kole96
    Participant
    New

    Thank you

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

Draw a Vertical Line at midnight


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Kole96 @kole96 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Kole96
2 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/23/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...