Backtest Lab Docs

Start State

Every Backtest Lab strategy has a mandatory Start State, which serves as the starting point of the strategy.

When a strategy begins execution, the Start State is automatically active. The strategy evaluates its outgoing conditions and remains in the Start State until one of those conditions is satisfied, triggering a transition to another state.

The Start State has three defining characteristics:

  • Mandatory: Every strategy must contain a Start State.
  • Unique: A strategy can have only one Start State.
  • No Entry Actions: Unlike other states, the Start State cannot have actions associated with it. Its purpose is to evaluate conditions and direct the strategy to other states.

Automatic Return to the Start State

If a strategy enters a state that has no outgoing conditions, it automatically returns to the Start State.

This allows the strategy to begin looking for new opportunities without requiring an explicit connection back to the Start State.

For example, a strategy might enter an Exit Long state to close an existing trade. If this state has no outgoing conditions, the strategy automatically returns to the Start State after performing its configured entry actions.

The Start State therefore serves both as the initial state of the strategy and as the default state to which the strategy returns when it reaches a state without outgoing conditions.