I use !synchronisation from broker to strategy signal in order to synchronise the broker with the chart in cases of disconnection or of manual input at the broker side.
The chart is synchronised regarding the live orders but not synchronised regarding the Stop and Limit orders.
For example lets assume the strategy has created a buy order (+65k) and then a SL and TP attached with this order. Then connection is lost between MC and broker (IB). When connection is up again, the synchroniser will place a sync order on the chart. If the strategy issues a sell short, the posision will be reversed (-65K). However the SL and TP orders as a result of the first buy order will not be deleted on the broker and remain active.
Is there an automatic way to delete them, apart of manualy action on the broker?
Synchronisation of Stop and Limit orders
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Synchronisation of Stop and Limit orders
Hello kecha1,
Unfortunately there is no automatic way to remove active (pending) orders if there has been a disconnection. You need to cancel them manually to avoid possible overfill because your strategy will not see the orders after the disconnect.
Unfortunately there is no automatic way to remove active (pending) orders if there has been a disconnection. You need to cancel them manually to avoid possible overfill because your strategy will not see the orders after the disconnect.