Good evening, long time user of the ToS platform but relatively new to writing ThinkScripts.
Question 1:
I am writing a script that will plot multiple lines (lets say 12+), but I would like to globally set the color and style for all lines, instead of per "plot" (see sample code below). I have searched and I cannot find a way to do this in ThinkScript. Is this possible?
# Instead of setting color and style for each plot, globally declare for all plots in script here
plot line1 = 410;
line1.SetDefaultColor(color.PINK);
line1.SetStyle(3);
plot line2 = 415;
line2.SetDefaultColor(color.PINK);
line2.SetStyle(3);
Question 2:
Essentially I am wanting to create "price levels" via ThinkScript instead of right clicking the chart and adding them. You know how you can add a label text to be displayed to the right or left of the price level? How can I do this in ThinkScript? I'd like to add a text label for each line I plot that sits just on top of the plotted line.
Thanks!
Question 1:
I am writing a script that will plot multiple lines (lets say 12+), but I would like to globally set the color and style for all lines, instead of per "plot" (see sample code below). I have searched and I cannot find a way to do this in ThinkScript. Is this possible?
# Instead of setting color and style for each plot, globally declare for all plots in script here
plot line1 = 410;
line1.SetDefaultColor(color.PINK);
line1.SetStyle(3);
plot line2 = 415;
line2.SetDefaultColor(color.PINK);
line2.SetStyle(3);
Question 2:
Essentially I am wanting to create "price levels" via ThinkScript instead of right clicking the chart and adding them. You know how you can add a label text to be displayed to the right or left of the price level? How can I do this in ThinkScript? I'd like to add a text label for each line I plot that sits just on top of the plotted line.
Thanks!