–
Net P&L (booked + unbooked)
—
Worst-side exposure →
—
Stops in place (MCX, all accounts)
—
checking…
Booked P&L (selected range)
—
Unbooked P&L (open)
—
Closed trades ↓
—
Open positions ↓
—
Margin used (open positions)
—
Max margin — NRML days (PE+CE, all)
—
calculating…
Overnight exposure →
—
Max profit — expiring today
—
open premium + realised
Max profit — carried forward
—
not expiring today
Open positions
Copy accounts — main vs followersthe Monitor and Copy pages show these too
Reconciliation vs. Kite
Closed positions
Requests received
Instrument routing, trading control & configon Instrument Config
Enable/disable per-instrument trading, edit lots/premium targets, and see
today's live routing decision -- all moved to their own page for room to work.
→ Open Instrument Config
How this works — flow, dependencies & limitations
Flow
- A TradingView Pine script fires a webhook (
SELL_PE,SELL_CE,ROLL_PE,ROLL_CE,EXIT_PE,EXIT_CE) with an instrument and an SL level (a futures price). The Requests received table shows exactly what happened to it — Status (hover for what each one means) and Reason (hover for the full text: which decay %, which SL mismatch, the exact order error, etc.). - On a fresh SELL: the strike nearest the target delta is picked from live quotes, a
genuine MARKET order is placed (Kite's own
market_protectionparameter, same mechanism as the app's "Market order" button — not a LIMIT-order approximation), a broker-side SL-M (stop-market) safety stop is armed at 3× the entry premium (tick-snapped, and briefly confirmed against an async exchange rejection before trusting it — Kite can accept a stop order and have the exchange reject it moments later, invisible to a plain try/except), and the position is recorded here. - If that order hasn't confirmed filled within ~10s, it's escalated by widening the same order's protection band (mirrors Kite's "Convert to Market" action on a pending order) rather than given up on — a real, live order is never dropped from tracking even if it's just slow to fill on thin liquidity.
- On ROLL: if nothing of that side is open, there's no old leg to roll out of, but the new level is still real — it opens a position exactly like a fresh SELL would. If a leg is open, it only rolls (buys back the old strike, sells a new one) if that leg's premium has decayed 40% from entry, or has reached the nearest price it can trade at to that level (sold 0.15, tick 0.05: rolls at 0.10) — otherwise the strike stays put, but the tracked active SL still updates to this signal's level, since TradingView keeps reporting the new level in every future signal regardless of whether we accepted the roll.
- On EXIT: only acts if the alert's SL matches the position's tracked active SL — a signal for a rejected/old rollover level won't match and is ignored.
- Strike selection, in full: the target-delta strike is tried first (normal day) or the premium target is tried first (expiry day), each falling back to the other if nothing liquid is found. A premium-picked strike whose delta comes out above 0.25 is rejected in favour of a delta pick instead (2026-09-17) — a premium target can otherwise land right next to ATM without warning, especially near expiry when extrinsic value compresses; see Strike selection in the open/closed position tables (hover a cell for the exact numbers).
- Product (NRML vs MIS): an entry opened on the instrument's own expiry day goes out MIS instead of NRML (2026-09-17) — Kite blocks, and later devolves, an NRML order on a contract that close to its own expiry. Decided once at entry and always reused to close that position, never recomputed later, since Kite tracks NRML/MIS as separate position books. See the Product column.
- Background stop reconciliation, every 15s: if a broker-side stop fires on Kite's side with nothing telling this app (no push from Kite for that), a background check catches it within 15 seconds and closes the record here with the real fill price — this is not the same as the read-only Reconciliation vs. Kite table below; it runs independently and does act. A stop that only partially fills before the rest gets cancelled (thin liquidity) is split: the filled slice is closed, the position shrinks to the real remaining qty, and a fresh stop is armed for that remainder automatically (2026-09-17) — you'll see an urgent notification either way, and if the replacement stop itself fails to arm, the position stays OPEN and is flagged unprotected rather than silently dropped.
Dependencies
- A live Kite session — without it, signals are only logged, nothing trades (check the status strip at the top: Broker logged in / Session expiry). Kite tokens expire ~06:00 IST daily, and the server does not refresh its session on its own — it builds the Kite connection once at startup, so a stale/expired session strip means the server needs restarting after a fresh login, not just waiting.
- A cron job runs
scripts/daily_login.pyat 08:56 IST on weekdays — automatic TOTP login + server restart, oncekite.totp_secretis set inconfig.yaml(Zerodha Console → Password & security → App code). Until then, or as a fallback, log in manually withscripts/login.pyand restart the server yourself. - The TradingView alert must be correctly configured (Condition =
Order fills, Message ={{strategy.order.alert_message}}) — a misconfigured alert sends the literal placeholder text and is rejected as invalid JSON. - Exit depends entirely on TradingView actually sending that webhook, or the broker-side stop firing on its own.
Limitations — nothing hidden here
- No automatic price-based exit on our side. The Future LTP / SL buffer % columns are for you to watch — nothing in this system polls the futures price and exits on its own. That only happens via a TradingView webhook or the broker-side stop.
- Reconciliation vs. Kite is read-only. The section above compares every position we track as OPEN against Kite's live position for that exact contract and flags mismatches (e.g. the broker-side stop fired, or it was closed manually in the Kite app) — it never acts on its own; you close it here or fix it directly in Kite. It also can't detect a Kite position we have no record of at all (this account also holds unrelated manual trades).
- Editing the tracked SL isn't available. It was removed on purpose: without watching the futures price ourselves, changing it would only affect which future webhook gets honoured — no added protection — while breaking sync with TradingView. The only action here is Close.
- Close is real and irreversible. It places an actual MARKET order when the server is not in dry-run mode.
- At most one open PE and one open CE per instrument — a fresh SELL is rejected if that side is already open. If that open position is stuck (illiquid, buy-back never fills), press ⊘ Ignore on it: signals stop matching it, so the rejected signal's ▶ Open trade button appears in Requests received. An ignored position is still OPEN — its safety stop stays armed, it's still squared off on expiry, and Close still works.