Signal Rules help you avoid wrong order placement through strategy/button misfire. APIBridge allows deep level of control on how to process your Signals.
You can manage Signal Rules by clicking on top Application Settings ->Signal Settings.
Strategy Misfire Management
- Avoid consecutive order placement with same values: This rule avoids strategy misfire with repeated signals. If Bridge receives consecutive Signals with exactly same params, it will start ignoring the repeated Signal with message: “Signal with same params is ignored”
- LX/SX Send Quantity <= NetPos: This is very important rule to prevent wrong trades. Example: Bridge places Limit order based on LE, but it does not get fill. When a new LX signal is received, it will NOT send Sell order for LX, because the current NetPos is zero. If the order sent via LE was only partially filled, it will send LX with partial quantity only. If APIBridge is not correctly displaying NetPos because of Broker API Errors, you should keep it unticked. For positional trading also you should keep it unticked. If this rule is violated, Bridge gives message: Long/Short Position not found.
- LE place order only in NetPos <=0 & SE place order only in NetPos >=0: This is another important rule to prevent wrong trades. Example: your trading strategy misfires and you are sending repeated LE Signals. Bridge will not process the LE (no buy orders) if the Net Position is already Long. However, you can keep this rule un-checked if you want to scale-in to your trades.
Order Cancellation Rules
- LE (SE) cancels order from prev LE/LX (SE/SX): This rule can be used to manage open/pending/trig pending orders. Example: Bridge places Limit order based on LE, but it does not gets filled. When it receives a new LE signal (which could be at more opportunistic price), it will cancel the open Limit order sent via LE.
- LX (SX) cancels order from prev LE/LX (SE/SX): Similar to above rule used for order management based on LX/SX. Example: Bridge places Limit order based on LE, but it does not get fill. When it receive a new LX signal, it will cancel the open Limit order sent via LE.
- MaxProfit squares current position and cancels all open orders in particular symbol: Applicable only when MaxProfit is setup in Symbol Settings window. Note that you can control MaxProfit from symbol settings. If you tick here, it also automatically cancels open orders. If you untick here, it does not automatically cancel open orders, BUT MaxProfit remains enabled based on symbol settings.
- MaxLoss squares current position and cancels all open orders in particular symbol: Applicable only when MaxLoss is setup in Symbol Settings window. Note that you can control MaxLoss from symbol settings. If you tick here, it also automatically cancels open orders. If you untick here, it does not automatically cancel open orders, BUT MaxLoss remains enabled based on symbol settings.
- SquareOffAll button cancels all open orders: If you tick here, it also automatically cancels open orders. If you untick here, it does not automatically cancel open orders, BUT SquareOffAll will work when clicked.
- Time Based SquareOff cancels all open orders: If you tick here, it also automatically cancels open orders. If you untick here, it does not automatically cancel open orders, BUT time based squareoff will still work based on symbol settings.
Hi,
I have faced the following issue with Api bridge :
Issue 1). Order placement issue with multiple strategies in Amibroker
I am trading multiple strategies with different strategy tags but the same instrument (Nifty Fut / Bank Nifty Fut).
I have also enabled all the rules for signal settings (including LE place order only in NetPos <=0)
When strategy 1 (STRAT1) places LE order for BankNifty Fut, it gets filled with 50 qty. Later when another strategy (STRAT2) places LE order for BankNifty Fut, it is skipped because the BankNifty Fut net position is NOT <= 0 (it is 50). Hence the second strategy is not implemented.
In sum, the signal setting rule (LE place order only if NetPos <=0) is creating issue in case of running multiple strategies for the same symbol.
Issue 2): Continuing with the above example, the LE order of STRAT2 strategy was skipped. Later when STRAT2 LX order is fired from source, it actually fills incorrectly by exiting the STRAT1 open position. This is concerning because STRAT1 position is still open and the its strategy has not fired LX order yet. However, LX from STRAT2 is actioning closure (LX) for STRAT 2
Is there a way that the above signal setting rule can be applied specific to each strategy rather than at a Global level? Also, another other way to fix this issue?