Skip to main content

Stoxxo Bridge - Options Portfolio Execution feature notes

Sources: 13 screenshots of the Options Portfolio Execution window (tabs: Execution Parameters, Range Breakout, Extra Conditions, Other Settings, ReExecute, Monitoring, Dynamic Hedge, Target Settings, Stoploss Settings, Exit Settings, At Broker, Security) and the Google Doc "Advanced Options Strategy Execution_NewChanges" (read 17 Oct 2026). This is a live execution tool, not a backtester, so it shows what traders actually run live. A backtester that wants to be comparable should model the rule logic, and skip broker plumbing. See also StockMock and AlgoTest.

1. Portfolio defaults​

  • Symbol, expiry, default lots, predefined strategies (straddle, strangle, spreads...), strike selection Normal (fixed strike) / Relative (ATM +/- n) / Both.
  • Underlying: Spot or Futures; Implied Futures (synthetic ATM = strike + CE - PE, based on day-open ATM).
  • Price type: LTP, BidAsk, BidAskAvg (backtest: we only have bar OHLC; use close, with slippage).
  • Strike step (e.g. 50 / 100 / 500), "allow far strikes", positional portfolio, "buy trades first".
  • Tgt / SL on per-lot basis: all rupee values refer to 1 lot (so lot count does not change the rule).
  • Value (premium) of all lots and per lot; credit spreads show negative premium.

2. Leg grid (per leg)​

ID, Idle, Buy/Sell, CE/PE/FUT, lots, expiry, strike, Hedge Req, Wait & Trade, Target (type + value), Trail Target, Stoploss (type + value), Trail SL, SL Wait, On Target action, On Stoploss action, target portfolio name / count, leg Start Time, Spread Limit.

  • Idle leg: not entered at start, entered only by another leg's action or at its own start time (adjustments, delayed legs).
  • Leg start time can differ per leg; positional legs can carry a date and time.

3. Strike selection​

  • Relative ATM +/- steps; fixed strikes; Straddle Width Multiplier (CE = ATM + k x ATM straddle, PE = ATM - k x ATM straddle, rounded to strike step; negative = ITM).
  • Premium / Greek legs: value type Premium, Nearest Premium, Delta, Nearest Delta, IV, Theta, Nearest Straddle Premium (% of ATM straddle). Range ("between a and b") or nearest, with condition >= / <=, max depth (up to 50 strikes from ATM), side ITM / OTM / both. Fails -> leg or portfolio idle.
  • Risk On / Risk Off on re-execution: move n strikes toward ITM (negative) or OTM (positive).

4. Entry modes (portfolio level)​

ModeMeaningBacktest notes
StartTimeenter at start timethe TBS core
CombinedPremiumenter when combined premium reaches X (better or equal)needs minute-by-minute scan from start to end time
CombinedPremiumCrossoverenter only on a real crossover of X
UnderlyingLevelenter when underlying crosses a level
RollingStraddleBreakoutenter when rolling ATM straddle moves by +/-% or points vs day open or start-time value
Manualby handnot applicable
  • Based on: None / DayOpen / StartTime, with rounding value and adjust price (points / %).
  • Premium gap between legs 1 and 2 (e.g. straddle CE and PE within 10 %) - wait until true, checked only between start and end time.
  • Spread limit (liquidity) and Qty by exposure (lots = capital / premium x lot size), Max lots.
  • Run on days (weekday selection), Start, End, SqOff time (positional: 00:00 or 23:59 = no timed squareoff).

5. Range breakout (3 kinds)​

  1. Underlying range: high / low of start time to range end time; buffer (points or %); Realtime or MinuteClose n monitoring; entry at High / Low / Any; one-side only; strategy applied on the breakout side (e.g. CE on high, PE on low).
  2. Leg range: each leg's own high / low in the window; buy legs on high break, sell legs on low break; opposite-side SL (range other end is the SL); legs exempt from breakout.
  3. Strategy range breakout: pick a predefined strategy (e.g. long straddle), track its premium high / low / average / start value in a window, breakout value in points or %, static or rolling strikes, "breakout minutes" (look-back).
  • Monitoring on candle close is measured from 09:15 (n-minute candles anchored at open).

6. Extra conditions (filters)​

  • Gap up / gap down of the underlying (min / max %), day-open vs previous day high / low conditions for the underlying and for each leg.
  • Leg current-day change (positive / negative, min / max % vs day open).
  • If condition fails: stop portfolio, or only that leg.
  • Combined Wait & Trade, and leg Wait & Trade (+/- points or %, monitoring realtime / minute close / interval, "if one leg hits W&T execute the others at force price or after n seconds", trail W&T).
  • All CE legs combined P&L and all PE legs combined P&L: max profit / max loss in rupees, squares off only that side.
  • Premium comparison monitoring: when CE and PE premium differ by more than x % (or min points, held n seconds), square off the chosen leg and treat it as SL or target.
  • If one side activated, cancel other side (W&T / range breakout legs).

7. Leg target / stop loss​

  • Types: Premium (points or %), AbsolutePremium (exact price), Underlying (points, %, or absolute level; direction derived from buy / sell and CE / PE), Strike (like underlying but measured from the strike price), Delta / Theta.
  • Target lock and trail (rupees): "if profit reaches A lock B", "for every increase of C trail by D".
  • SL trail (points / %): "for every X favourable move trail SL by Y"; SL never moves back; worked example in doc (sell 200, SL 10 % = 220, trail 3 % / 1.5 %).
  • SL wait seconds (re-check to avoid wicks) - cannot be replicated with 1-min bars except as "SL on candle close".
  • Move SL to Cost: when one leg's SL hits, other profitable legs' SL move to break-even (+0.05 %); "trail only after move to cost"; options to perform it on each SL / target hit; "no re-execute / no re-entry if moved to cost".

8. Actions on leg target / SL (the adjustment engine)​

SqOff current portfolio, SqOff Leg1..8, Execute Leg1..8 (idle legs), SqOff / Execute / Start other portfolio, ReExecute Current Portfolio, ReExecute Leg (fresh strike selection by current ATM), ReExecuteLeg_AfterFill_SqOff, ReEntry (re-enter the same strike when price returns to original entry price), Duplicate_And_Execute, Opposite_Position (flip buy / sell on each re-entry), Keep_Leg_Running (pyramiding / averaging), SqOff_Linked_Legs, ReExecute_Portfolio_OnComplete, Pyramiding, ReExecute_Portfolio_AtEntryPrice, ReExecute_At_Opposite_Leg_LTP (re-enter the stopped leg at the strike whose premium is nearest the other leg's LTP, the classic straddle "re-balance"), Reverse_Position (not implemented). Max counts via the "portfolio name" field.

  • Re-entry settings: monitoring (realtime / minute close / interval), min delay, re-entry at original leg's average price, order type, trigger on SL price or entry price with buffer, "no re-entry if moved to cost".
  • Re-execute settings: no re-entry after portfolio end time, max re-execute count (total, on SL, on target), no W&T on re-execute, no strike change on re-execute, safety seconds (loop protection - irrelevant offline, but backtest needs a max count guard).
  • Which target / SL events trigger actions: only plain, only trailing, or both.

9. Portfolio-level target / stop loss​

  • Types: Combined Profit / Loss (rupees or %), Combined Premium (points or %), Absolute Combined Premium, Underlying Movement, Delta / Theta (portfolio greeks), Loss and Underlying Range (loss OR underlying leaves a band).
  • Portfolio profit protection (lock / trail in rupees) and combined SL trailing (for every increase in profit trail SL by...).
  • On SL sq-off only loss-making legs (leave profit legs running), SL wait seconds.
  • Actions: none, re-execute, execute / sq-off other portfolio, re-execute at entry price, on complete action (any completion except manual / time squareoff).
  • Strategy-level (group of portfolios): max profit / loss, lock and trail. User-level: max profit / loss, lock and trail.

10. Monitoring modes​

Realtime (tick), MinuteClose n (evaluate only at n-minute candle closes anchored to 09:15), Interval n seconds. Separate settings for leg target, leg SL, combined target and SL, W&T, re-entry, range breakout, positional monitoring windows (default 09:15 - 15:30). For a 1-min backtest: realtime = check bar high / low, minute close = check bar close.

11. Dynamic hedge​

Sell legs with "Hedge Req" get a bought hedge picked at entry: type premium based, min / max distance from ATM (in strikes), max premium, optional max CE / PE spread, strike step, unsatisfied-condition action, hedge squares off with portfolio or with the leg. Backtest: pick hedge strike by premium cap and distance.

12. Execution-only items (do not model)​

Product (MIS / NRML), strategy tag, user multiplier, retries, leg execution parallel / sequential, KeepPlacedLegs / ExitPlacedLegs, order types (market, limit, SL-limit), limit price adjust, order slicing, delay between legs, exit sell-first, stop exit if no positions, at-broker SL / target / re-entry / W&T orders (with SL trigger adjust), security roles and passwords, part entry / part exit, multi-user sync. Model instead as costs: slippage %, brokerage, STT and charges, freeze-quantity slicing impact (ignore).

What this adds to the TBS engine design​

  1. Event-driven simulator, not a fixed entry / exit loop: legs have states (idle, waiting W&T / breakout, open, closed), and SL / target events trigger actions that create, close or re-create legs.
  2. Three monitoring modes map to bar logic (high / low vs close; n-minute candle close).
  3. Entry modes beyond start time (combined premium, crossover, underlying level, rolling straddle breakout, range breakouts).
  4. Per-lot rule normalisation (store rules per 1 lot; scale by lots x lot size at P&L time).
  5. Legs by strike rule: ATM offset, straddle-width multiplier, nearest premium / delta / straddle %, ranges with depth and side.
  6. Filters: gap, previous-day levels, day change, run-on-days, DTE.
  7. Combined-premium sign convention (credit = negative) must be explicit in the spec.
  8. Loop guards: max re-execute / re-entry counts, one action per bar.
  9. Greeks (delta / IV / theta) need an option pricing module (Black-Scholes with IV solved from bar close) - Phase 2.