Initial Steps
It appears you're having trouble canceling orders, and here's a breakdown of why that might be happening, according to the sources:
Order Completion
- An order cannot be canceled if it has already been filled. This can occur when prices change very rapidly, especially in volatile markets.
- If the market fills an order before the broker processes a cancellation request, the broker will reject the cancellation.
- This rejection can occur even if you try to cancel an order at a price far from the bid/ask, because sudden market spikes can complete an order before the cancellation can be processed.
- When using the Replikanto, a cancellation on the leader account may not be processed on the follower accounts if the order is filled before the cancellation can be copied.
Order Management System (OMS) Rejection
- The message "Cancellation Rejected by the Order Management System" is generated by the broker's OMS when a cancellation request is received after the order has been filled by the market.
Market Volatility
- Market volatility is a key reason why cancellations may fail. Prices can change very rapidly, and an order can be completed before a cancellation or change request is processed.
- Sudden market spikes may complete an order before the cancellation or change can be processed, even if you cancel or modify at a price far from the bid/ask.
Order State
- Once an order is completed (filled), it cannot be changed or canceled.
- "Working" orders can be modified or canceled at any time before being filled.
- "Cancelled" orders cannot be modified or cancelled.
Strategies to Minimize Cancellation Issues:
- Avoid attempting to cancel orders very close to the bid/ask price.
- Widen your stop orders. Place orders a little further from the current bid/ask.
- Avoid trading in high volatility environments.
- Consider using market orders to open positions, then setting profit target and stop-loss orders further from the bid/ask price.
- Use OCO (One Cancels Other) orders to define position exit orders.
- Use the Follower Guard feature in Replikanto to flatten the follower account if a reject message is received by the broker.
- When using the Replikanto trade copier, the ATM Copy feature is highly recommended.
Replikanto and Order Cancellation
- When using Replikanto, if the leader cancels or changes an order, the action is copied to the follower account. However, the time it takes for this to happen may not guarantee that the order is canceled or changed because it could be filled earlier.
- When using Replikanto's cross order feature, there is an increased chance of an order not being filled on one side. This is because the two instruments may not move exactly in sync, especially during high volatility.
- Replikanto is designed to work with orders placed within the NinjaTrader environment. When orders are submitted by external programs, some information may be missing, which can lead to errors or undesired behavior.
When using Tradovate Accounts
- The problem with the orders being frozen (golden orders) that cannot be canceled in NinjaTrader is due to network connectivity problems between Ninjatrader and the broker, where a client's connection to the order entry server is either severed or unstable and prevents the order cancel, change or position close command from working as intended.
- In addition, our recommendation is that if this happens, you should disconnect and reconnect to the Ninjatrader brokerage connection to update the pending orders in Ninjatrader so that they can be canceled, in most cases it works. If it doesn't work, you'll need to try canceling on the broker's website.
- For the Tradovate acounts, due to the Tradovate API rate limit of 5,000 requests per hour (80 per minute) for the Tradovate/NinjaTrader connection, orders and positions may freeze once this limit is reached. To avoid this, we do not recommend using trailing stops or multiple price changes in a short period. NinjaTrader 8.1.4+ has fixed this issue (#14091) and will display a message to the user that the Tradovate API rate limit has been reached, older NinjaTrader versions will freeze the orders without any explanation.
- You may find it helpful to use the Copy Market Orders (Executions) Only Replikanto feature, which allows you to copy only the executions to followers. For more information, we invite you to view this informative video.: https://youtu.be/WZ5rmeAuxZE
By understanding these factors, you can better manage your orders and minimize the chances of failed cancellations.
Comments
0 comments
Article is closed for comments.