Running Strategies
Once a strategy is built, the Strategies panel on the right of the chart page is where you start it, stop it, and check on it. This page covers the controls and what they actually do — particularly around stopping, restarting, and editing while running.
Starting a strategy
In the Strategies panel, hover over a strategy's icon to bring up its run panel. From there you choose:
- Mode — Backtest, Paper, or Live.
- Testnet (Live mode only) — leave it checked to use the exchange's testnet, uncheck for real-money trading. Production-mode Live shows a confirmation dialog before it actually starts.
Click Run Strategy and the strategy begins ticking in that mode. The strategy's icon picks up a running indicator (green border, subtle pulse) so you can see at a glance which strategies are active.
A few things will block a start:
- External indicator without a live mode configured — if the strategy references one and you try to run paper or live, the start fails with a clear message naming the indicator.
- External signals in backtest mode — backtests refuse strategies that reference external signals, since those are live-only by definition.
- Live mode without a connected exchange — the broker has nothing to trade through, so the start errors out.
Stopping a strategy
Click Stop Strategy in the run panel and the strategy stops ticking immediately.
The important detail: stopping a strategy does not close its open positions.
- Paper mode — open positions, balance, orders, and SL/TP are all persisted with the strategy. They stay there until you start the strategy again or you close them manually from the Trades panel.
- Live mode — positions live on the exchange. They keep existing exactly as before; only your strategy stopped sending instructions to manage them. Stop loss and take profit you set on the exchange continue to apply; trailing stops or in-platform-only protections do not.
- Backtest mode — backtests are single-shot. Stop interrupts the run; there are no live positions to worry about.
If you want the strategy to flatten before stopping, do it from inside the strategy (e.g. add an Exit Strategy and close all trades block on a kill condition) or close positions manually before clicking Stop.
Restarting a strategy
Clicking Run again on a stopped strategy does not start it from a blank slate.
- Paper mode — the strategy resumes with its previous balance, positions, and orders intact. Internal state like Blockly variables and flags is reset, but the broker state (positions, P/L, orders) is restored.
- Live mode — the new run reconciles with the exchange before it starts trading: it queries the current balances, sees any positions that are still open, and continues managing them under the same strategy logic. Any flags or variables the strategy used to track its own state are reset, so if your strategy depends on
in_long/in_shortflags, you'll want a flag-cleanup pattern that re-derives state fromhas_positionon the first tick. (See the Formations as Circuit Breaker tutorial for the cleanup pattern.) - Backtest mode — restart is a fresh replay from the configured start date.
Editing a strategy while it's running
You can open the Edit Strategy dialog on a running strategy. A yellow banner at the top warns:
⚠️ This strategy is currently running in [mode] mode. Changes will not take effect until you restart it.
That's exactly right. The running instance uses a snapshot of the strategy's code from when it started; saving edits in the dialog updates the stored definition but doesn't touch the running instance. To apply the changes, stop and start the strategy again — and remember from the previous section that paper and live state will carry over.
For most edits this is fine. For changes that affect open-position management (different exit logic, different stop-loss handling), be conservative: consider closing positions manually before restart so the new logic isn't trying to manage a position the old logic opened.
Built-in safety: the live circuit breaker
Live strategies run with a built-in equity circuit breaker. If account equity falls more than 10% below the starting equity for the run, the circuit breaker trips:
- The strategy keeps ticking but skips its trading logic — no new entries, no position management.
- A notification fires letting you know which strategy tripped and why.
- The strategy panel surfaces the tripped state in the run-info hover.
The circuit breaker is a safety net, not a stop-loss. It does not close any positions when it trips; it just prevents the strategy from making things worse. Once you've decided what to do (close positions manually, edit the strategy, or accept the drawdown), you reset the circuit breaker and the strategy resumes normal operation.
What happens on a strategy error
If a strategy throws an error during a tick (a Python exception in the generated code), the platform logs the error and emits an event to the UI. The strategy itself does not auto-stop. It will retry the same logic on the next tick.
This is deliberate — transient errors (a one-off API timeout, a brief data gap) shouldn't take the whole strategy down. But repeated errors mean something is genuinely wrong, and you'll want to stop the strategy and investigate. Watch the alerts panel and the events log for repeated failures.
Stopping everything fast
There's no "stop all my strategies" button. To stop multiple strategies you stop each one individually from its run panel.
For platform-wide emergencies (e.g. a major outage on an exchange), the platform admin has a global halt that disables all live trading until they re-enable it. You'll see this as your live strategies skipping ticks; paper and backtest are unaffected.