Automatic safeguards during order execution — margin retry, freeze limit splitting, partial fill handling, and fill reconciliation.
Order Intelligence is the layer between your trade signal and the broker. It handles the things that go wrong during execution — rejected orders, partial fills, exchange limits — so you do not have to intervene manually.
When the broker rejects an order due to insufficient margin, Order Intelligence retries with one fewer lot. It continues stepping down until the order fills or reaches one lot.
Signal: buy 6 lots of AAPL
Attempt 1: 6 lots → REJECTED (insufficient margin)
Attempt 2: 5 lots → REJECTED (insufficient margin)
Attempt 3: 4 lots → FILLED
Tradeoff: Each retry is a separate market order. In fast-moving markets, the price may slip between attempts. You get filled at 4 lots instead of 6, and the fill price reflects the delay. This is the cost of automatic recovery versus manual re-entry.
Bounds: Retry only triggers when original lot count is between 2 and 9. Single-lot orders have nothing to step down to. Orders of 10+ lots skip retry — margin rejection at that size indicates a larger issue. Retries also stop if more than 10 minutes have elapsed since the original signal.
Smart discrimination: Only margin-related rejections trigger retry. If the broker rejects for a different reason (invalid instrument, market closed, regulatory block), the order fails immediately with no retry.
Margin retry reduces your position size to fit available capital. Check your Telegram alerts to confirm how many lots actually filled.
Exchanges impose maximum order sizes (freeze limits). An order for 3,600 units on an instrument with a 1,800-unit freeze limit cannot go through as a single order.
Order Intelligence splits the order automatically:
Total quantity: 3,600
Freeze limit: 1,800
→ Order 1: 1,800 units
→ Order 2: 1,800 units
The split happens before the order reaches the broker. Each batch is a separate market order. All batches target the same instrument and direction.
Freeze limits are derived from exchange metadata — not hardcoded. When an exchange updates its limits, your orders reflect the change at next execution.
If a market order fails (broker-side rejection or timeout), Order Intelligence can fall back to a limit order at the last known price. This is a recovery mechanism, not a default — market orders are the primary execution path.
When an order partially fills (100 of 300 units executed), Order Intelligence detects the shortfall and retries the remaining quantity.
Order: 300 units
Fill 1: 100 units → partial
Retry: 200 units
Fill 2: 200 units → complete
The watchdog polls the broker for order status across multiple attempts with short delays between each check. It classifies each order as COMPLETE, PARTIAL, REJECTED, STUCK, or FAILED. Partial fills trigger automatic retry of the unfilled quantity.
Duplicate signals are rejected at the sizing layer. If a position already exists for an instrument on an account, the entry signal is suppressed. This prevents double entries from webhook retries, duplicate alerts, or network timeouts that cause signal re-delivery.
The suppression is per-account, per-instrument. Account A holding AAPL does not block Account B from entering AAPL.
When an entry fills across multiple partial orders or retry attempts, your effective entry price is not the first fill — it is the volume-weighted average price (VWAP) across all fills. VWAP accounts for different quantities filling at different prices, giving you a single entry price that reflects your true cost basis.
Fill 1: 100 units @ $185.20
Fill 2: 200 units @ $185.35
VWAP = (100 × 185.20 + 200 × 185.35) / 300 = $185.30
This VWAP becomes your entry price for all downstream calculations — SL trailing, R-multiple milestones, P&L reporting. It reflects your actual cost basis, not the price of any single fill.
The reconciliation runs in the background after order placement. After order placement, the order ID enters a reconciliation pipeline that polls for fill status, computes VWAP from all partial fills, and records the final entry price.
Every state change during order execution is logged to Telegram:
You see every decision the system makes, as it makes it. No silent failures.
Order reconciliation runs on a queue with automatic retries. If the broker API is temporarily unavailable, reconciliation retries up to 5 times before routing to a dead-letter queue for manual review.
This is engineering infrastructure, not investment advice. All trading involves risk of loss.