Turn a Vertical command into a Label

Branch

Member
VIP
How can you take a vertical command and turn it into a Label? I want this VerticalLine command to be a label that at the start of a given time (or the time below) a label will pop-up that states "New York - 15m" and remain visible until 1600 hour.

AddVerticalLine(SecondsTillTime(0915) == 0, " 30m NEW YORK ", Color.dark_gray, Curve.FIRM);
 

Pensar

Well-known member
VIP
@Branch Maybe like this? Make sure it is showing during the correct times, I havent coded much with time functions.

Code:
input start = 0915;
input end = 1600;

def time = if SecondsTillTime(end) > 0 and SecondsFromTime(start) >= 0 then 1 else 0;

AddLabel(time, " 30m NEW YORK ", Color.DARK_GRAY);
 
Last edited:

Branch

Member
VIP
@Branch Maybe like this? Make sure it is showing during the correct times, I havent coded much with time functions.

Code:
input start = 0915;
input end = 1600;

def time = if SecondsTillTime(end) > 0 and SecondsFromTime(start) >= 0 then 1 else 0;

AddLabel(time, " 30m NEW YORK ", Color.DARK_GRAY);
Thank you Pensar!
 

Similar threads

Top