I am able to manually attach existing target order to any indicator plot.
I would like to be able to programmatically attach existing order to an indicator that is currently loaded on specific chart. Assuming that specific indicator is loaded, I need to perform following:
1. Identify correct chart (there are articles on how to do it)
2. Find specific indicator instance on that chart.
3. Attach order to that specific indicator plot - possibly with few ticks offset, and also indicate boolean value whether to "move towards last price only".
4. Then in case I need - how to uncheck "Enabled" once it is already attached - in order to "Detach" that order from indicator?
The reason for me to go "Extra Mile" is because order is placed by 3rd party add-on, and once that order is placed - I want to programmatically adjust it (by finding order from Account object, etc..).
Could you please guide or provide sample code on how to accomplish all these items?
Thanks

Comment