Backtest evidence

Is ATR period 14 optimal, and does the period or the comparison window move the result more?

ATR Periods and Comparison Intervals: 720 Tests

Finding

The comparison window. Across 6 ATR periods from 5 to 50, 5 comparison windows from 1 to 20 bars and both rising and falling ATR — 60 settings per block, 720 runs over three timeframes and four windows — the one-bar comparison on hourly bars averaged −562.6 pips in 2024 and −1,149.2 pips in 2025, losing in both years. The ordering of the ATR periods by average result did not agree between 2024 and 2025. Splitting by ATR direction, falling ATR averaged +913.5 pips in 2024 and +350.1 in 2025 against −97.9 and +245.9 for rising ATR, but the 2025 profitable counts were close at 20 of 30 versus 19 of 30, so the direction alone does not select a setting.

Key results

The one-bar comparison on hourly bars
−562.6 pips in 2024, −1,149.2 pips in 2025
Falling versus rising ATR, 30 hourly settings each
falling +913.5 / +350.1 pips, rising −97.9 / +245.9 pips
Median ATR(14)
11.21 pips on M15, 23.48 on H1, 48.90 on H4

Scope

  • USDJPY, 2025, with 2024 run under identical settings and 2025 also split into halves
  • 15-minute, hourly and four-hour bars
  • 6 ATR periods (5, 10, 14, 20, 30, 50) x 5 comparison windows (1, 3, 5, 10, 20) x rising/falling ATR = 60 settings per block, 720 runs in total
  • Fills at the close, flat 0.3 pip spread, 0.1 lots

Method

Measured with Formiq's backtester. ATR has no direction of its own, so direction came from price: when the ATR condition held, a price rise over the same comparison window opened a long and a fall opened a short. The exit is the opposite signal, with entry and exit sharing one rule set. No stop or target in the main comparison.

Limitations

  • The sample runs from 1 January 2024 through 31 December 2025.
  • Fills use the close and the main sweep fixes the spread at 0.3 pips.
  • ATR uses Wilder smoothing with warmup before each measured window.
  • MetaTrader, TradingView and Formiq expose different smoothing choices, so match the method before moving a numerical setting between platforms.