Join waitlist
Strategies / Breakout / Zero Lag ATR Band Breakout

Zero Lag ATR Band Breakout

Buys when the close crosses above a zero-lag line plus 2 ATR while it rises, and sells short when the close crosses below the line minus 2 ATR while it falls. Trades exit on a cross back through the line, with 2 ATR stops and 4 ATR targets.

BreakoutLong & shortSwingUSD/JPYDaily
1.45Profit factor
24,260Net profit USD
41.26%Win rate
349Trades
-4,850Max drawdown
69.51Avg trade

Best run of 2. USD/JPY, Daily, spread 1, from run pf:2026-10-05-USDJPY-D.tsv:13.

Entry rules, long

  1. The zero-lag line (2 times EMA(20) minus the EMA of that EMA over 20 periods) is higher than on the previous bar.

Entry rules, short

  1. The zero-lag line is lower than on the previous bar.

Exit rules

  1. A short closes when the close crosses over the zero-lag line, unless a long signal occurs on the same bar.
  2. Each trade has a stop 2 times ATR(14) and a target 4 times ATR(14) from the entry.

Test conditions

PeriodUp to 2026-10-05
InstrumentUSD/JPY, Daily
Spread1 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.45 34941.2624,260 USD-4,850
GoldDailyn/a 27342.12711 EUR-516

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Zero Lag ATR Band Breakout
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

emaa = ExponentialAverage[20](close)
emab = ExponentialAverage[20](emaa)
zl = 2 * emaa - emab
myAtr = AverageTrueRange[14](close)
upper = zl + myAtr * 2.0
lower = zl - myAtr * 2.0

24 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

EMAATR
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run24,260.00 USD
Net, long run24,260.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run Zero Lag ATR Band Breakout in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 2 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.45 over 349 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,850 USD at the tested position size, against a net result of 24,260 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

One Standard Deviation Band Breakout

Also a breakout strategy.

1.45 PF · 812 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs