I have created an AddOn that creates a drawing in the chart using an indicator I created. The indicator is very simple and I just use it to refresh the chart after adding the drawing, and as the owner of the drawing.
I have attached a very simple AddOn/Indicator to demonstrate the issue.
Replication Steps:
- Import AddOn.
- Open chart.
- Add "Test_Indicator" to chart.
- Press "Create Drawing" button in add-on panel .
- Right click on chart and select "Reload All Historical Data" from the context menu.
You will see after doing this the drawing disappears and is not redrawn.
This also happens when a data connection is made too. Like if you create the drawing using the Create Drawing button before NT connects to its data source, then when it does the drawing will disappear.
This behavior does not happen with user drawn chart objects. If you follow the steps above, but instead of creating the drawing using the AddOn button, you use the X Region drawing tool, the drawing does not disappear.
How can I prevent drawings created with the AddOn from disappearing when the chart data is reloaded.
Thanks for your time.
Comment