📑 Backtest Rules

Overview

Backtest Rules define when your strategy is allowed to trade and which market conditions must be present during testing.
Here you can set the backtest period, an optional Volume-Over-Moving Average filter, and up to three custom trading sessions (with UTC offsets).

Backtest Period

Backtest Start

Sets the start date for your Strategy Tester runs. Only data from this date onward is included.

Backtest End

Sets the end date for your Strategy Tester runs. Data after this date is excluded.

Example

No items found.
To test long histories, use wide dates (e.g., 2000 → 2050).
Longer lookbacks may require a higher TradingView plan to unlock more historical bars.

Volume Over MvgAvg

Filters trades to periods where at least one candle in your pattern has volume above a volume-weighted moving average. This helps filter out low-volatility zones and ensures your pattern occurs in a context of active price movement.

Settings

  • MvgAvg Type: Simple Moving Average (SMA) or Exponential Moving Average (EMA).
  • Length: number of bars used to compute the moving average of volume
  • Multiplier: scales the moving average threshold.
    (Use Multiplier = 1 to keep the raw moving average as the threshold. Increase it (e.g., 1.5–2.0) to demand stronger-than-usual volume).

Example

No items found.
This helps avoid low-volatility zones and focuses backtests on active, high-participation market contexts.

Trading Sessions

You can define up to three trading sessions. If none is enabled, trades are allowed at any time.
When one or more sessions are enabled, a trade is valid only if the last candlestick of your setup occurs inside one of the enabled sessions.

Session

  • Enable: turn on/off Session filtering.
  • Session: set the HHMM–HHMM time window (e.g., 0930–1600).
  • UTC: set the UTC offset (e.g., -4 for New York).
    To set a UTC+, enter a positive value (e.g. 2 for UTC+2). To set a UTC-, enter a negative value (e.g. -4 for UTC-4).

UTC Offset Examples

Time is based on the UTC offset (Universal Time Coordinated) :

  • New York = UTC-4
  • London = UTC+1
  • Tokyo = UTC+9
  • Sydney = UTC+10

Example

No items found.
To see all available UTC offsets, click the clock at the bottom-right of your TradingView chart and open the 'Timezone' dropdown list.
No items found.
No items found.
No items found.
No items found.
No items found.