Hello
I am trying to plot vertical lines for certain events. I will use NY Market open time as an example. I am using this code:
input targetTime930 = 930;
def targetBar930 = SecondsFromTime(targetTime930) == 0;
AddVerticalLine(targetBar930, "Market Open", Color.YELLOW, curve.FIRM);
My chart is on a 15Min time, so when I add this to the script, it will plot the vertical line at 9:15, 15 minutes before 9:30. If i use a 5 minute chart, it will plot the time 5 minutes earlier than 9:30.
Can you help me with this? I am new to scripting. I want to be able to be correct on multiple timeframes.
Appreciated.
I am trying to plot vertical lines for certain events. I will use NY Market open time as an example. I am using this code:
input targetTime930 = 930;
def targetBar930 = SecondsFromTime(targetTime930) == 0;
AddVerticalLine(targetBar930, "Market Open", Color.YELLOW, curve.FIRM);
My chart is on a 15Min time, so when I add this to the script, it will plot the vertical line at 9:15, 15 minutes before 9:30. If i use a 5 minute chart, it will plot the time 5 minutes earlier than 9:30.
Can you help me with this? I am new to scripting. I want to be able to be correct on multiple timeframes.
Appreciated.