I got this indicator that plots a line at a specific time. Can someone help me edit it (or can it be edited) to anchor the line to a date? Right now, the indicator keeps plotting the line each day based on the input time, but I dont want it to start over each day, I want it to be anchored to the time as well as the date I enter. Can this be done?
#vertical line at a specific time
input startdate = 20220101;
Input time = 1200;
def starttime = secondsFromTime(time)==0;
def ext = if starttime then open else ext[1];
plot x = ext;
#AddVerticalLine(starttime, "Time = " + time , color = Color.Gray, stroke = Curve.POINTS);
#Vertical lines with the most flexibility/options
Input Percent_Range1 = .00125;
plot plotopenzoneH = X + (X * Percent_range1);
plot plotopenzoneL = X - (X * Percent_range1);
Input Percent_Range2 = .005;
plot plotSDhalfH = X + (X * Percent_range2);
plot plotSDhalfL = X - (X * Percent_range2);
Input Percent_Range3 = .01;
plot plotSD1H = X + (X * Percent_range3);
plot plotSD1L = X - (X * Percent_range3);
Input Percent_Range4 = .0075;
plot plotSDRH = X + (X * Percent_range4);
plot plotSDRL = X - (X * Percent_range4);
Input Percent_Range5 = .02;
plot plotSD2H = X + (X * Percent_range5);
plot plotSD2L = X - (X * Percent_range5);
Input Percent_Range6 = .015;
plot plotSD15H = X + (X * Percent_range6);
plot plotS15L = X - (X * Percent_range6);
Input Percent_Range7 = .03;
plot plotSD3H = X + (X * Percent_range7);
plot plotSD3L = X - (X * Percent_range7);
input bubblemover = 3;
def b = bubblemover;
def b1 = b + 1;
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotopenzoneH, "ALGO Tracking Zone ", Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotopenzoneL, "ALGO Tracking Zone " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDhalfH, " Be smart Trader! Take some profits here " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDhalfL, " Be smart Trader! Take some profits here" , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD1H, "Target#1 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD1L, "Target#1 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDRH, "!Reversal! ", Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDRL, "!Reversal! " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD2H, "Target#2 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD2L, "Target#2 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD3H, "Take out STOPS here! (always look for H/L day to left!) " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD3L, "Take out STOPS here! (always look for H/L day to left!) " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD15H, "halfway " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotS15L, "halfway " , Color.light_gray, no);
AddLabel(yes, "I hunt ALGO", Color.gray);
#vertical line at a specific time
input startdate = 20220101;
Input time = 1200;
def starttime = secondsFromTime(time)==0;
def ext = if starttime then open else ext[1];
plot x = ext;
#AddVerticalLine(starttime, "Time = " + time , color = Color.Gray, stroke = Curve.POINTS);
#Vertical lines with the most flexibility/options
Input Percent_Range1 = .00125;
plot plotopenzoneH = X + (X * Percent_range1);
plot plotopenzoneL = X - (X * Percent_range1);
Input Percent_Range2 = .005;
plot plotSDhalfH = X + (X * Percent_range2);
plot plotSDhalfL = X - (X * Percent_range2);
Input Percent_Range3 = .01;
plot plotSD1H = X + (X * Percent_range3);
plot plotSD1L = X - (X * Percent_range3);
Input Percent_Range4 = .0075;
plot plotSDRH = X + (X * Percent_range4);
plot plotSDRL = X - (X * Percent_range4);
Input Percent_Range5 = .02;
plot plotSD2H = X + (X * Percent_range5);
plot plotSD2L = X - (X * Percent_range5);
Input Percent_Range6 = .015;
plot plotSD15H = X + (X * Percent_range6);
plot plotS15L = X - (X * Percent_range6);
Input Percent_Range7 = .03;
plot plotSD3H = X + (X * Percent_range7);
plot plotSD3L = X - (X * Percent_range7);
input bubblemover = 3;
def b = bubblemover;
def b1 = b + 1;
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotopenzoneH, "ALGO Tracking Zone ", Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotopenzoneL, "ALGO Tracking Zone " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDhalfH, " Be smart Trader! Take some profits here " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDhalfL, " Be smart Trader! Take some profits here" , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD1H, "Target#1 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD1L, "Target#1 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDRH, "!Reversal! ", Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSDRL, "!Reversal! " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD2H, "Target#2 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD2L, "Target#2 " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD3H, "Take out STOPS here! (always look for H/L day to left!) " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD3L, "Take out STOPS here! (always look for H/L day to left!) " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotSD15H, "halfway " , Color.light_gray, no);
AddChartBubble(!IsNaN(close[b1]) and IsNaN(close), plotS15L, "halfway " , Color.light_gray, no);
AddLabel(yes, "I hunt ALGO", Color.gray);
Last edited by a moderator: