Backtest Lab Docs

Condition Schedule

A Condition Schedule allows you to control when an individual condition is eligible for evaluation.

While a strategy schedule applies to the strategy as a whole, a condition schedule applies only to the condition on which it is configured.

This allows different conditions within the same strategy to operate during different periods of the trading week.

Defining Active Time Slots

Condition schedules use the same calendar-style interface as Strategy Schedules.

You can think of each active time slot as a recurring appointment in a weekly calendar. Instead of scheduling a meeting, however, you are scheduling when a condition is allowed to be checked.

For example, suppose your intraday strategy enters trades when the market price crosses above a moving average.

You may want to avoid entering new trades during the final hour of the trading session, since there may be insufficient time for the trade to develop before intraday square-off.

You could configure the entry condition to be active from 9:16 AM to 2:30 PM on each trading day.

Outside this period, the condition is not evaluated and cannot trigger its associated state transition.

Other conditions in the strategy remain unaffected unless they have their own schedules or are restricted by a strategy-wide schedule.

Interaction with the Strategy Schedule

If both a strategy schedule and a condition schedule are configured, their active time slots must overlap for the condition to be evaluated.

For example:

  • Strategy Schedule: 10:00 AM to 3:00 PM
  • Condition Schedule: 1:00 PM to 3:30 PM
  • Effective Evaluation Window: 1:00 PM to 3:00 PM

The condition is eligible for evaluation only during the overlapping period.

If there is no overlap between the two schedules, Backtest Lab reports an error because the condition can never become active.

Special Trading Sessions

Like strategy schedules, condition schedules include a setting that controls whether the condition is active during special trading sessions outside normal market hours.

When both schedules are configured, the condition must be permitted by both the strategy schedule and its own condition schedule to be evaluated during such sessions.

State Timeout Behavior

Condition schedules do not apply to State Timeout behavior.

A state timeout operates independently of its outgoing conditions' schedules. It can therefore return the strategy to the Start State even when those conditions are not currently eligible for evaluation.

Learn more about State Timeout.