All posts
PublishedByATRAverage True Rangevolatilityindicator settingsbacktestUSDJPY

ATR Settings: Comparison Bars Mattered More Than Period

ATR period 14, calculation, and platform setup explained. In 720 USD/JPY runs, the comparison window changed trades and profit more than the ATR period.

Average True Range (ATR) measures how far price moves per bar. It ignores whether the move was up or down and turns intrabar range and price gaps into one volatility line.

Period 14 is the familiar default. But across 60 combinations of periods 5 to 50, comparison windows from 1 to 20 bars, and rising or falling ATR, the comparison window changed the result more than the ATR period did. On the hourly chart, the one-bar comparison averaged −562.6 pips in 2024 and −1,149.2 in 2025.

Falling ATR over ten bars with period 20 made +3,022.6 pips in 2024 and +2,184.5 in 2025. A default-like period 14, five-bar comparison with rising ATR lost 639.6 and 393.1 pips. Period 20 is not a universal answer: changing the period alone did not repair a weak reading of the line.

010203040506070M15H1H4ATR(14) (pips)
M15: 11.21 pipsH1: 23.48 pipsH4: 48.90 pipsbar = 10th to 90th percentile, dot = median
ATR(14) medians in 2025 rose from 11.21 pips on M15 to 48.90 on H4. An ATR number has no meaning without its timeframe.

What ATR measures

ATR starts with True Range, the largest of three distances:

  1. Current high minus current low
  2. The distance between the current high and the previous close
  3. The distance between the current low and the previous close

If the current candle spans ten pips but opened away from the previous close, True Range keeps the larger gap-inclusive distance. MetaTrader 5's ATR documentation gives the same three-part calculation.

Formiq smooths True Range with Wilder's recurrence. For period N, the newest True Range receives a weight of 1/N and the previous ATR receives (N−1)/N.

PeriodWeight of newest barBars until old influence halves
520.0%3.11
147.1%9.35
502.0%34.31

ATR(14) is not a simple average that forgets everything after 14 bars. It absorbs 7.1% of each new True Range while the older influence decays gradually.

ATR has no trade direction

True Range uses absolute distances, so ATR cannot fall below zero. A crash and a rally can both lift it. TradingView's official ATR guide explicitly describes ATR as a volatility measure rather than a price-direction indicator.

The tested rule therefore did not invent a side from ATR. When ATR was above or below its value a specified number of bars earlier, price rising over those same bars opened a long and price falling opened a short. The opposite price direction closed the trade while the ATR regime still held.

ATR settings and signals

ATR appears as one line in a separate pane below price. It has no standard 30/70-style guide levels.

PlatformWhere to add it
MT4 / MT5Insert → Indicators → Oscillators → Average True Range
TradingViewSearch Indicators for Average True Range
FormiqPick ATR from the indicator list

Chart settings

InputDefaultWhat it changes
Period14How quickly True Range is smoothed
Line colour and widthPlatform-dependentAppearance only

The standard MetaTrader ATR calculation exposes the period. TradingView starts at 14 and lets the smoothing change among RMA, SMA, EMA and WMA. Formiq exposes the period and line appearance and uses Wilder smoothing for the calculation.

Backtest settings

InputStarting valueWhat it does
ReadingATR risingChooses whether ATR must be above or below its earlier value
Period14Sets the response speed of the ATR line
Comparison bars5Looks this many bars back for both ATR and price direction

The common interpretation is to read rising ATR as expanding movement and falling ATR as contraction. Neither supplies a side; price direction, a breakout, or another directional rule is still needed.

Across the 60 settings, changing the period left mean hourly trade count between 815 and 828 in 2025. Changing the comparison window moved it from 1,569.8 trades at one bar to 337.8 at 20 bars. The comparison window, not the period, was the main trade-frequency control.

How this was measured

ItemValue
PairUSD/JPY
Window2025, repeated in 2024 and split into first and second half of 2025
Timeframes15-minute / 1-hour / 4-hour
ReadingsATR rising / ATR falling; price direction from the same comparison window
ATR periods5, 10, 14, 20, 30, 50
Comparison windows1, 3, 5, 10, 20 bars
Runs60 settings per cell; 3 timeframes × 4 windows = 720
ExitOpposite signal; entry and exit share one rule set
Fill and costClose, fixed 0.3-pip spread, 0.1 lot
Stops and targetsNone in the main sweep; tested separately

Pips were recalculated from each trade's fill prices.

The hourly chart kept 29 of 60 settings in both years

Counts profitable in both 2024 and 2025:

TimeframeProfitable 2024Profitable 2025Both years2024 median2025 median
15-minute24/609/606/60−312.8−1,205.8
1-hour36/6039/6029/60+532.5+954.9
4-hour50/6022/6022/60+1,674.2−711.6

Only the hourly chart had a positive median in both years. The 15-minute chart traded often and its median setting lost in both years. Four-hour settings reversed from 50 of 60 profitable in 2024 to 22 of 60 in 2025.

The comparison window separated results more than the period

Each row averages 12 hourly settings across both readings and all six periods.

Comparison barsMean 2024Mean 2025Mean trades 2025
1−562.6−1,149.21,569.8
3+794.5+1,146.4940.8
5+163.4+676.6727.0
10+869.6−40.6517.8
20+773.9+856.9337.8

The one-bar comparison lost in both years and traded 4.6 times as often as the 20-bar version. Reclassifying ATR as up or down on every small one-bar change generated too much turnover.

Mean trade count by ATR period stayed between 815 and 828 in 2025. Period 5 led mean net profit in both years at +743.5 and +561.7 pips, but other periods did not preserve their ordering: period 30 moved from −106.2 to +310.3, while period 14 fell from +475.2 to +200.0. Nothing in the grid made 14 uniquely strong.

Falling ATR had a positive mean in both years

ReadingMean 2024Profitable 2024Mean 2025Profitable 2025
ATR rising−97.913/30+245.919/30
ATR falling+913.523/30+350.120/30

Following price while volatility expanded had a negative mean in 2024. Falling ATR averaged a profit in both years, but the 2025 profitable counts were nearly tied at 20 of 30 versus 19 of 30. The ATR regime alone did not select a robust setting.

Two of six one-year winners lost in the other year

The best setting in one year was run unchanged in the other:

TimeframeSelection yearSettingSelection yearOther year
15-minute2025Rising / 10 / 10+1,226.12024 +970.0
15-minute2024Rising / 14 / 20+2,503.82025 −738.7
1-hour2025Falling / 10 / 5+2,541.72024 +341.8
1-hour2024Falling / 20 / 10+3,022.62025 +2,184.5
4-hour2025Falling / 10 / 3+2,809.62024 +2,359.1
4-hour2024Falling / 5 / 1+4,225.72025 −596.7

Two of the six transfers lost money. The 2025 hourly winner stayed positive in 2024 at +341.8 pips, but finished below the 2024 median of +532.5.

The hourly falling-ATR, period-20, ten-bar setting made +1,166.9 pips in the first half of 2025 and +993.5 in the second. Its survival was not confined to one half, but period 20 cannot be separated from the falling reading, ten-bar comparison and hourly chart that produced it.

Period 14 with rising ATR lost on the hourly chart in both years

The chart default period with the strategy builder's five-bar starting window:

TimeframeYearTradesWin rateNet
15-minute20242,11135.20%+68.4 pips
15-minute20252,29233.77%−807.1 pips
1-hour202457734.32%−639.6 pips
1-hour202557432.40%−393.1 pips
4-hour202412735.43%−558.6 pips
4-hour202513937.41%−860.1 pips

A common chart period is not automatically a trading-rule default. Only the 15-minute 2024 cell was profitable.

A 35% win rate still worked when wins were twice as large

The hourly falling-ATR, period-20, ten-bar setting:

YearTradesWin rateMean winMean lossNet
202462835.51%+54.66 pips−22.63 pips+3,022.6 pips
202560136.94%+51.75 pips−24.55 pips+2,184.5 pips

Its win rate stayed below 40%, while the mean win was more than twice the mean loss. Ranking ATR settings by win rate would discard that payoff difference.

ADX and stops did not improve both years

The same hourly setting with one addition at a time:

Addition20242025
None+3,022.6+2,184.5
ADX(14) at 20 or above+646.9−572.2
Exit after 24 bars+2,840.5+2,482.2
Stop 50 / target 100 pips+2,942.2+1,472.7
Stop 1 ATR / target 2 ATR+1,940.0+554.9
Stop 2 ATR / target 3 ATR+1,456.6+1,151.7

The 24-bar exit added 297.7 pips in 2025 but removed 182.1 in 2024. ADX and all four stop/target cases failed to beat the baseline in both years.

An ATR-sized stop adapts the unit to current volatility; it does not create an exit edge by itself. In this sample, the fixed 50/100-pip exit finished ahead of both ATR exits in both years, and all three trailed the signal-only baseline.

A one-pip spread removed 600.9 pips from 601 trades

The same 2025 candidate:

SpreadTradesNet
0601+2,364.7 pips
0.3601+2,184.5 pips
1.0601+1,763.8 pips
2.0601+1,162.8 pips

The break-even spread was 3.93 pips. Cost declines by trades multiplied by spread, so the high-turnover one-bar settings reach their limit sooner.

Notes

  • The sample runs from 1 January 2024 through 31 December 2025; 2025 was also split into halves
  • Fills use the close and the main sweep fixes 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

Questions people ask

What is the best ATR period?
Period 14 is the common chart default, but it did not lead this USD/JPY test. Across periods 5, 10, 14, 20, 30 and 50 on the hourly chart, the ordering changed between 2024 and 2025. The number of bars used to compare ATR and price mattered more: a one-bar comparison had a negative mean in both years.
Does a rising ATR mean buy?
No. ATR has no price direction and rises during large moves either up or down. This test supplied direction from price: when the ATR condition held, a price rise over the same comparison window opened a long and a price fall opened a short.
What ATR value counts as high?
The timeframe has to be fixed first. On USD/JPY in 2025, the median ATR(14) was 11.21 pips on M15, 23.48 on H1 and 48.90 on H4. The same 14-period input covers a different amount of clock time on each chart.
Was rising or falling ATR more profitable?
Averaged over 30 hourly settings each, falling ATR produced +913.5 pips in 2024 and +350.1 in 2025; rising ATR produced −97.9 and +245.9. Yet the 2025 profitable counts were close at 20 of 30 versus 19 of 30, so the ATR direction alone did not select a setting.
Is ATR built into MT4 and MT5?
Yes. In MT4 and MT5, add Average True Range from Insert → Indicators → Oscillators. It starts at period 14 and draws one line in a separate pane. TradingView and Formiq also include ATR.

Formiq is a free browser-based FX terminal with replay practice and no-code backtesting. Open the chart or see what the free plan includes.