
I. Auto handling of cancelled Stoploss orders:
Using this functionality the algo executes exits when stoploss or targets are hit even if the stoploss orders that are placed in advance are cancelled by the Broker or the trader himself.
II. Use Case:
Sometimes, Stoploss orders placed in advance are cancelled by the Brokers intentionally in some scenarios or are cancelled by the traders unintentionally/by mistake from the trading terminal. When such cancellations occur, the algo doesn't receive an error message with a cancellation reason and hence the algo cannot manage the exits and the trader has to manually place stoploss and target orders in the terminal and manage the exits manually. Also, since there is no error message coming from the broker at the time of the cancellation of the order, the trader would not know the order is cancelled, making the situation risky.
Quantiply now provides a functionality to handle this scenario. If the functionality is activated from under the Advanced Settings on the algo settings page, this functionality will handle stoploss and target exits for legs whose Stoploss orders were cancelled intentionally or unintentionally by the Broker or the trader himself.
III. How it works:
If this functionality is enabled, the following will happen, if the stoploss orders placed in advance are cancelled:
1. A custom error message will be shown under the leg - "Stoploss order cancelled by the Client or Broker. Cancellation reason not received from the Broker"
You will also see a message under the error message: "You can use the Individual leg RETRY functionality to place the SL order again. If not, the algo will handle this unexpected Cancellation by monitoring the price & exiting this position when Stoploss or Target is hit."

2. A Telegram error notification will be sent out to your Telegram Notifications bot.
3. Algo will start monitoring the price continuously and exit automatically if the stoploss or target is hit (so no need to place the stoploss order or target order manually from the terminal)
4. Alternatively you can select the legs with the errors, and use the RETRY individual leg functionality to place a fresh stoploss order.

IV. Important pointers:
1. You can enable or disable this functionality by selecting the option from under the Advanced Settings on the algo settings page. This setting is 'enabled' by default for new algos and old algos. If you intend to cancel orders yourself and manually manage positions, then you can disable this functionality

2. This functionality works only for Exit orders ie. exits that are triggered when target or stoploss is hit for individual legs and for combined premium based MTM Targets and MTM Stoplosses. This functionality doesn't work if entry order placed in advance are cancelled. For Entry orders the RETRY individual leg functionality can be used if an error message for cancellation comes from the broker.