Skip to content

Scenarios: create, set status, halt and resume trading

Goal: register a scenario (a market, portfolio and strategy setup, e.g. a backtest), pause, resume or archive it, halt and resume its trading, and stop all trading at once with the kill switch.

Prerequisites

  • Signed in as an admin (anyone may Use a scenario).
  • The target context is active; on a protected context each write asks first.

Steps: add a scenario

  1. Open Trading > Scenario (route /trading/scenario).
  2. Add… The dialog Add a scenario opens.
  3. ID: upper-case letters, digits and _, at most 32 (e.g. BACKTEST_1); not LIVE. Name: optional (defaults to the ID).
  4. Market: World (default act) and Universe (default ALL). Portfolio: World. Strategy: World and, optionally, Strategy id.
  5. Add. The scenario is registered active.

Steps: work in a scenario

  1. Select its row and press Use (or Enter). The line above the table says using <ID> ((real trading) for LIVE).
  2. Trading > P&L and Trading > Risk now show that scenario (their scenario picker switches it too). The choice is per browser and per context.

Steps: pause, resume, archive

  1. Select the scenario.
  2. Pause… → Pause scenario <ID>? (Its workers stop taking decisions until it is resumed.) → Yes. On a paused scenario the button is Resume.
  3. Archive… → Archive scenario <ID>? (It stays registered, read only; it trades no more.) → Yes.

LIVE cannot be paused, archived or deleted.

Steps: halt and resume trading

  1. Select the scenario (any, LIVE included).
  2. Halt trading… → Halt trading of <ID>?: its strategies withhold their orders and its executors refuse them until it is resumed. Open orders stay (the kill switch cancels them). Yes.
  3. To resume: Resume trading… → Resume trading of <ID>? → Yes.

Steps: the kill switch

  1. Press Kill switch in the header (admins; any view).
  2. The dialog Kill switch on <context> shows the plan: Halt N scenarios (every one not archived or deleted) and Cancel all orders of M executors (the running executors).
  3. Continue, then Yes, stop trading now (Really? This stops trading on <context> now.). On a protected context the write gate asks once more.
  4. Read the report: halted: …, and per executor N order(s) canceled; failures in red (NOT halted …, cancel-all FAILED: …). Nothing resumes by itself: resume each scenario with Resume trading….

Steps: delete a scenario

  1. Select it, Delete…. Irreversible: it is marked deleted, taken out of the index, every state key under sc.<ID>. is purged, then its entry is deleted.
  2. Type its ID into Type its ID to confirm, press Delete, then Yes, delete it.

What you should see

  • The row's Status (active, paused, archived) and Trading columns change at once.
  • A halt: the header shows ⛔ N halted on every view; an alert trading halted: … (error), and trading resumed (info) when lifted.
  • Infra > Changes: each action.

Troubleshooting

Symptom Cause and fix
upper-case letters, digits and _ (at most 32) / a scenario '…' exists already / 'LIVE' is reserved Pick another ID.
A scenario shows as halted though nobody halted it Its halt key could not be read: unreadable counts as halted (safe side). Check sc.<ID>.trading.halt in Infra > States.
Kill switch: N executor(s) not running They place nothing and take no command; nothing to cancel.
Kill switch report: cancel-all FAILED That executor did not answer; check it in Infra > Workers and cancel at the venue if needed.
No Kill switch button You are not an admin, or no context is active.

More: Views > Scenario.