Demo and live deployments
What changes when a script runs for real, and what does not.
Deploying a strategy runs the same script on a demo or live account. The runner evaluates each closed bar, hands out instructions, and waits to be told what actually happened.
- The broker decides fills. A backtest may decide a fill itself. Live, a trade exists only once the broker has confirmed it, and an instruction is never sent twice.
- Restarts are safe. Open trades and their management, rule counters, sequences part way through and pending orders live in a snapshot. After a restart the runner replays recent bars to warm the indicators back up and continues where it left off, so a restart cannot quietly abandon a stop.
- Demo follows the written rules. Demo deployments fill under the same execution rules as a backtest: a market order fills at the next bar's open, and when a stop and target are both reached in one bar the stop fills first unless finer data says otherwise.
- Live uses the side that can trade. A buy is triggered and filled on the ask and a sell on the bid. A long trade's stop and target trigger on the bid, a short trade's on the ask (E3, E4, E5). Backtests have no spread, so this is one reason live results differ.
- Guards still apply.
max_daily_lossstops new entries until the next UTC day, andmax_drawdownpauses the deployment until you resume it (E20). - The deployment chooses where it runs. A script says what it was written for, and that comes filled in, but the market, the bar size, the trade size and the balance to trade belong to the deployment. A strategy written for EURUSD on the hour can be deployed on gold on five-minute bars by changing two fields.
- Demo or live is said plainly. Demo fills against the AlgoBars engine and costs nothing. Live sends real orders to a real broker.
- Live sizes the way the test did. The live runner places a stop where the backtest placed it and sizes a trade the same way, so what was tested is what trades.
- Edits are explained first. Changing a script that is already running shows what the change would do once it is live, before you make it.
Chart replay uses the same runner and the same rules, so what appears in replay is what the script would have done.
You are responsible for a live deployment. AlgoBars is software and connects to your own broker account. It does not hold your funds and does not give financial advice. Trading involves significant risk of loss.