ATR Trend Follow for USDJPY (USD/JPY)
Volatility-adjusted trend following — trail stops by ATR multiples.
Indicators
EMA 21, ATR 14
Recommended Timeframes
1h, 4h, 1d
Symbol Volatility
medium
Trading Sessions
Tokyo, London, New York (24/5)
Why ATR Trend Follow Works on USDJPY
A simple EMA trend with ATR-based exits. Stop and trailing stop scale with the asset's realised volatility, so the same code works on quiet EUR/USD and wild Bitcoin. ATR multipliers (typically 2-3×) are the only parameter you need to tune per market.
USD/JPY is heavily driven by yield differentials and BoJ policy. Slow-grinding trends on the daily, predictable Tokyo-session ranges — a strong fit for swing and trend bots.
Forex pairs trade with tight spreads, deep liquidity, and predictable session-based behavior. The strategy below earns its edge during the active sessions for this pair.
Best For
- • Cross-asset deployment
- • Volatile markets
Avoid In
- • Low-ATR ranges
Pine Script Source
Copy this into PineForge — backtest on USDJPY or any supported symbol, then deploy as a live bot.
//@version=5
strategy("ATR Trend Follow", overlay=true)
ema_len = input.int(21, "EMA Length")
atr_len = input.int(14, "ATR Length")
atr_mult = input.float(2.5, "ATR Multiplier")
ema = ta.ema(close, ema_len)
atr = ta.atr(atr_len)
long_stop = close - atr * atr_mult
if close > ema and close[1] <= ema[1]
strategy.entry("Long", strategy.long)
if strategy.position_size > 0
strategy.exit("Trail", from_entry="Long", stop=long_stop)Backtest ATR Trend Follow on USDJPY in 30 seconds
Sign up for PineForge, paste this Pine Script, and run a 1-year backtest on real USDJPY data — no credit card required.