Skip to Content
NeurotraderDocs
Concepts

Runs and statuses

The statuses of a simulation and the outcomes of a run, which operations each status offers, and what pause, stop and reset do.

A simulation is a setup, and a run is one time you start it. While you work, two things tell you where you stand: the status of the simulation, which says what it is doing now, and the outcome of each run, which says how that run ended. This page explains both, and what each button does in each state.

Statuses of a simulation

The status is shown next to the simulation's name, on its page and on its card in the Simulations list.

StatusMeaning
ReadyNothing is running. The simulation can be started.
RunningA run is in progress.
PausedA run has been frozen part-way and waits to be resumed.
ErrorA run could not start or failed. Select the status to read why.

A status belongs to the simulation, not to a run. When a run ends, however it ends, the simulation returns to Ready and can be started again.

Operations

The simulation's toolbar has four buttons: Run, Pause (which becomes Resume while the simulation is paused), Stop and Reset. The status decides which of them are offered.

StatusRunPauseResumeStopReset
ReadyYesNoNoNoYes
RunningNoYesNoYesNo
PausedNoNoYesYesYes
ErrorNoNoNoNoYes
Screenshot
The toolbar of a simulation's page while a run is in progress: the name, the Running status, and the Run, Pause, Stop and Reset buttons with Run and Reset disabled
  • Run starts a new run with the setup as it stands.
  • Pause freezes the run in progress.
  • Resume continues a paused run from the point where it was frozen.
  • Stop ends the run in progress.
  • Reset returns the simulation to Ready. Use it to clear an error after you have fixed its cause.

On the Simulations list you can select several simulations and apply Run, Pause or Stop to all of them. Each button acts only on the selected simulations whose status allows it. The steps are in Run control.

Start of a run

When you select Run, Neurotrader first checks the setup: the account, the data sources and the algorithms have to fit together. It then downloads any market data that is not on your computer yet, and only then begins to step through the candles.

If a check fails, no run is recorded. The app shows the reason, and the simulation goes to Error or stays Ready, depending on what failed. A plan limit, such as the number of runs you may have in progress at once, also refuses a start. See Plans and quotas.

Progress

While a simulation is Running, its page and its card show a progress bar, a percentage and the time the run has taken so far. The percentage is the share of the run's steps that are done. The total is an estimate made before the run begins, so a run can finish slightly before or after 100%.

When the last step is done, the simulation stays Running for a moment while the run's records are written. It returns to Ready only when the run can be opened, so a run you see in the history is always complete.

While a simulation is Paused, the bar stays where it was and shows the steps completed out of the total. It shows steps, not a clock, because nothing is happening.

Pause and resume

Pause freezes a run: the position in the data, the account, the open orders and each algorithm's own state are saved. Resume continues the same run from that exact point. No candle is replayed and none is skipped, and the finished run is the run you would have had without the pause.

A pause survives closing the app and restarting your computer. The simulation is still Paused when you come back.

While paused:

  • The run is not in the run history, and its charts and journal cannot be opened. Half a run's orders would show orders waiting that the rest of the run settles, which is a wrong picture and not a smaller one.
  • The setup cannot be restored from an earlier run, because that would change the setup under a run that is still in progress.

Run while paused

Run is not offered while a simulation is paused. A paused simulation already has a run in progress, and a simulation has one run at a time. Starting again would ask for a second run next to the frozen one. The way forward from Paused is Resume, or giving the run up with Stop or Reset.

Stop and reset while paused

Stop and Reset on a paused simulation discard the paused run. Nothing of it is kept: it does not appear in the run history, and it cannot be resumed afterwards. The simulation returns to Ready.

The app asks you to confirm first, with Stop the paused simulation? or Reset the paused simulation?

Screenshot
The confirmation dialog titled Stop the paused simulation?, explaining that the paused run cannot be resumed and that everything it did is lost, with the Cancel and Stop buttons

This is deliberate. A paused run has not finished, so it has no final results, and Neurotrader does not keep half a result that could be mistaken for a whole one. If you want to keep what a run has done so far, resume it and then stop it while it is running: a stopped run is recorded.

Stop of a running simulation

Stop on a running simulation ends the run at the next step. The run is recorded with everything it did up to that point: its results, its charts and its journal describe exactly the part that ran. It appears in the history with the outcome Cancelled and the share of the run it completed.

No confirmation is asked, because nothing is lost.

Outcomes of a run

Every run in the history has an outcome.

OutcomeMeaning
CompletedThe run reached the end of its data.
CancelledYou stopped the run. Its results cover the part that ran.
FailedSomething went wrong during the run. Select the outcome to read the reason.
InterruptedThe run did not end in an orderly way, for example because the engine was shut down under it.

A run on a margin account can carry a second mark beside its outcome, Liquidated or Bankrupt. See Margin and leverage.

For the figures of a finished run, see Results.

Live runs

A live simulation has the same statuses, with three differences.

  • There is no pause. A paused live run would come back to a market that had moved on without it. Pause is not offered, and the engine refuses the request.
  • Stop asks what to do with open orders. A live run can hold positions and have orders waiting, so the stop asks you to choose between closing them and leaving them. See Stopping a live run.
  • Progress has no percentage. A live run has no end date. The page shows how long it has been running and how many steps it has taken.

An Interrupted live run with a broker matters more than an interrupted backtest: its orders may still be waiting at the broker. The run's page lists the orders that were open when the run was last seen, and the simulation stays in Error until you reset it.

Statuses in the API

The API calls a simulation a runner. You send the operations start, pause, resume, stop and reset with operate_runner, and you read the status from get_runner. The same rules apply as in the app: an operation that the status does not allow is refused. While a runner is paused, it names its paused run, and get_run returns how far that run got.

On this page