Risk Management Guide

Server-owned execution SOP for AlgoRun and Backtest
STOT implemented

Risk priority

01Fresh dataStop evaluation requires a current option quote. Stale feeds block new entries and raise an operational alert.
02Protective stopMandatory 25% premium guard. Immediate and evaluated before strategy logic.
03Active TSLImmediate tick evaluation after activation. It only ratchets toward profit.
04Fixed SLUses an independent option-risk candle and consecutive close confirmation.
05Strategy invalidationSuperTrend reversal is checked on the selected underlying signal candle.
06Session RMSTrade limits, cooldown, daily controls, cutoff, persistence, and audit.

STOT stop simulator

Fixed strategy SL175.51
Immediate protective SL199.44
Fixed confirmation2 closes
Continuous breach limit60 sec

A SELL premium position is losing when premium rises. A BUY premium position is losing when premium falls.

What SuperTrend Reverse Exit means

It is an underlying strategy exit, not an option-premium stop.

Open directionCompleted signal candleAction
LONGSelected NIFTY Spot/FUT SuperTrend changes to REDClose the STOT option
SHORTSelected NIFTY Spot/FUT SuperTrend changes to GREENClose the STOT option

The configured STOT SuperTrend period, multiplier, signal underlying, and signal candle control this exit. The option risk candle does not.

Live and backtest parity

  • Live: protective and active trailing stops use fresh ticks; fixed SL uses option-risk closes; the persistence guard measures continuous live breach time.
  • Backtest: uses the smallest configured historical option candle. A fully breached candle supplies deterministic persistence evidence.
  • Signal: entry and SuperTrend reversal remain on the strategy signal candle in both engines.
  • No look-ahead: only completed candles may confirm a logical stop or strategy reversal.
  • Previous Nth close: N=1 uses the latest completed native risk candle. The candidate becomes active after that close, ratchets only toward profit, and is enforced by subsequent ticks or candles.

Execution SOP

ConditionRequired behaviorAudit evidence
Option quote staleDo not open a new position. Keep broker-side protection authoritative for live trading and alert the operator.Workspace, instrument, last quote time, quote age
Protective stop hitClose immediately before evaluating any softer rule.Order ID, threshold, tick, timestamp
Fixed stop breachedStart the continuous timer and count independent risk-candle closes. Exit when either configured rule confirms.Risk candle ID, close, count, timer
Fixed stop recoversReset consecutive closes and the continuous timer.Recovery tick and elapsed breach time
SuperTrend reversesExit only after the selected underlying signal candle completes.Underlying, timeframe, color, line, close
Service restartsRestore open legs, stop state, timers, order IDs, tradebook, and workspace ownership before accepting commands.Recovery event and state version

System-wide rollout contract

STOT is the first implementation of this model. Every strategy should converge on the same server-owned risk interface: