Is there a way to programatically manage drawing objects in pinescript?

Viewed 16

I would like my code to use drawings I put on the chart as "inputs" eg buy if the price closes in this rectangle I drew, or create/manipulate drawings eg create/move a line somewhere else etc...

1 Answers

You don't have access to user drawn objects.

However, you can draw the objects yourself, and then use the getter functions to get the coordinates or values from those objects. You can even delete them whenever you like.

Please see drawings for more details.

Related