Draw a Vertical Line at midnight

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #213628 quote
    Kole96Kole96
    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)
    New-York-Midnight.png New-York-Midnight.png
    #213633 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    Kole96Kole96
    Participant
    New

    Thank you

Viewing 3 posts - 1 through 3 (of 3 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

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 Kole96Kole96
3 years, 5 months ago.

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