We always insist our users to use cover orders instead of regular orders. Cover orders has much better risk management than regular orders. Please keep in mind that the software risk can not be eliminated but can be reduced by adopting best practices. Software risk includes but not limited to application crash, hardware issue, network issue and API sever issues etc. Periodically you have to audit your programs and systems.
Algo Trading consist of two part
1. Signal Generation
2. Executing Signals in Trading account (Auto Trading)
Whenever you get Signals (Buy/Sell/Short/Cover) in your trading system, you have to place corresponding orders in your trading account, depending upon the logic you may also need to modify or cancel orders. All this work good as long as everything is fine at user end as well as API server end.
We assume you are running un-attended trading setup.
Case1: Error While Placing Entry Order
Due to local network issues or API server issues, if you are unable to retrieve entry order status or got wrong status, but the order is actually executed, you may end up with open positions, which may result in unlimited loss. But in case of cover order, if the entry order is executed then OMS will place a corresponding stoploss order with predefined trigger price you passed.
Case2: Error While Placing Exit Order
If there is a network issue or program error while placing exit orders (Sell Or Cover), you may end up with open positions, which may result in unlimited loss. But using cover order, you already have stoploss orders in place which may limit your loss.
Case3: No Exit Signal In Trading System
If your trading system doesn’t generate exit signal (Sell Or Cover) due to some error in code or wrong data, your open position may not be closed which may result in unlimited loss. But if used cover order, then either your stoploss will hit or OMS will close your position at square off time.
Case4: Application Crash after Placing Entry Order
Again, cover order may save you from unlimited loss.
You may ask why can’t pull order book and check order status on getting error, if you have multiple trades in multiple symbols then it is difficult to reconcile orders, moreover if the order fail is due to API side, then how can we expect order book from API.
One should not retry order placement on getting error, because you exactly don’t know at what stage the request failed, from our past experience we see that most of the failed requests were actually executed in OMS.
Using cover order doesn’t mean that you are loss is protected, but it is far better than the regular orders as stoploss orders are managed by OMS. In case of regular orders, user has to manage the exit orders i.e. on getting signal (Sell Or Cover) if the stoploss order is already placed then retrieve the order id and modify to MARKET or if the stoploss order is not placed already, then place new exit order (Sell Or Cover).
In the past there have been cases where the cover order failed at OMS Level, in such cases everyone is affected and we can’t do anything.
Other advantages of CO:
Entry order is LIMIT order
Stoploss order executed in single (saves brokerage. BO may have multiple stoploss orders)
You can precisely define TrgPrice for stoploss order (Not possible in BO)
Other best practices:
1. Use Cloud Server to avoid Network issues
2. Leverage Cloud Server for low latency (Example: out of 10 orders, we are able to get better price in 8 orders)
3. Run Multiple Trading System in Different Cloud Server
4. Run Trading System in Multiple Symbol
5. Split orders to get better price as well as to reduce risk
(Example: Instead of placing 100000 Qty in single order, you may place two order with each 50000 Qty. This way even if one order is failed, the other may be executed.)