Backtest Lab Docs

Limit Order Expiry

A limit order is executed only when the market reaches a price that satisfies its specified limit. Until then, the order remains pending.

Limit Order Expiry allows you to specify the maximum amount of trading time a limit order can remain pending before it is automatically cancelled.

This prevents unfulfilled orders from remaining active indefinitely.

Maximum Order Wait Time

Backtest Lab allows you to configure a maximum waiting period in:

  • Days
  • Hours
  • Minutes

The waiting period is measured in trading time, not calendar time. Only time within trading sessions contributes to the order's expiry.

Periods when the market is closed, including overnight hours, weekends, and market holidays, do not count toward the waiting period.

For example, suppose a limit order is placed on Monday with a maximum wait time of one trading hour.

If the order is still pending when the market closes, any remaining waiting time carries over to the next trading session rather than expiring overnight.

If the limit price is reached before the waiting period expires, the order can be fulfilled. Otherwise, it is automatically cancelled when the maximum wait time is reached.

Capital and Order Cancellation

A pending limit order does not immediately consume capital from the trading account.

The required capital and trading charges are deducted only when the order is fulfilled.

If the order expires without being fulfilled, it is cancelled without deducting any capital or trading charges.

This means that an unfulfilled limit order does not reduce the account's available balance while it is waiting for execution.

For more information about how trading capital is shared across symbols, see Shared Account.