I made a custom drawing tool that is a global horizontal line.
What would be the way to destroy/remove that draw object if for example in its OnRender code it detected that the last price was above the line.
Basically I'd like a way to trigger the code that runs if the user removes the line themselves.
In the draw tool's code I have tried finding the object in the IChartObjects list and removing it, but the draw object stays on the chart.
This method seemed to work before in testing when I was doing the same thing via a charttrader button added by an addon.
Telling where the global chart objects are stored on disk would also be another way, then I could delete the line ref in that text file and set the horizontal line to locked and paint transparent, making it seemingly deleted. Then on next startup those global lines would really be gone.
Thanks for your assistance
Comment