How to add vertical lines that can be dragged on a chart?

J

jrfinkel

New member
Hello. I am new to ThinkScript, but hardly new to programming (30+ years).

I want to draw a collection of vertical lines, separated by a user-defined number of days, that can be placed on a day chart and dragged to different locations on that chart.

For example, I want to draw a vertical line at 9 days, 19 days, 43 days, and 65 days starting from an arbitrary, dragable point. The relative position of each would be a parameter in the scripts (using the Input keyword). In effect, I want to create a drawing surface that can be moved, and on that surface draw vertical lines (using, I suppose, the AddVerticalLine function).

Is this possible? If so, can someone please point me to a tutorial or example that might help me get started? Thanks in advance for all suggestions.
 
J

jrfinkel

New member
Ben,

Thanks. I had no idea that there was a built-in drawing tool that does this. I will investigate more. And thanks also for the link; I will check that out, as well.
 
J

jrfinkel

New member
It seems that what I want is really a new drawing tool. Drawing tools place their lines on a movable canvas that can be moved independently from the chart. I don't see a way to create one programatically.
 
J

jrfinkel

New member
Seems to me that any of the drawings made by one of those tools can be selected and dragged to a different position. I do it all the time.
 
BenTen

BenTen

Administrative
Staff
VIP
@jrfinkel You’re absolutely correct. I totally forgot about that. The drawings are draggables but you have to activate them first. I was thinking of another concept. My apology.
 
J

jrfinkel

New member
Am I correct, then, to assume that there is no way to script a new drawing tool?
 

Top