I've followed the sample in the docs for adding a button to chart trader.
The button gets added ok, but I'm getting an error when I close: "The calling thread cannot access this object because another thread owns it".
I think its because Addon is a singleton. And I've opened up two charts with the addon enabled. Then closed the first one, so the references inside the addon singleton actually point to the second chart's buttons, not the first chart which I am trying to close. Could be wrong about that....
I attached my code and the error. Any advice to get around this would be much appreciated.
Thanks
Kevin.
Comment