Join waitlist
Strategies / Breakout / Zero Lag Box Retest Breakout

Zero Lag Box Retest Breakout

The system draws a box at each zero lag crossover of EMA(34), buys when price moves back above the box top, and sells short on the mirror setup. Stops sit at the box edge and targets at 2 times that risk.

BreakoutLong & shortSwingUS Crude OilDaily
1.64Profit factor
20,557Net profit EUR
44.04%Win rate
193Trades
-3,393Max drawdown
107Avg trade

Best run of 5. US Crude Oil, Daily, spread 3, from run pf:2026-10-12-CRUDE-D.tsv:1.

Entry rules, long

  1. ZLMA crosses over EMA(34), drawing a box from ZLMA down to ZLMA minus ATR(14) and arming a long.

Entry rules, short

  1. ZLMA crosses under EMA(34), drawing a box from ZLMA plus ATR(14) down to ZLMA and arming a short.

Exit rules

  1. The profit target is 2 times the stop distance.
  2. An opposite entry closes the trade and reverses it.

Test conditions

PeriodUp to 2026-10-12
InstrumentUS Crude Oil, Daily
Spread3 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest runDaily1.64 19344.0420,557 EUR-3,393
USD/JPYDaily1.46 20944.0217,580 USD-4,230
Silver4 hoursn/a 52136.8522,236 USD-11,396
Nasdaq 100Dailyn/a 18633.8711,184 EUR-5,634
S&P 500Dailyn/a 25231.752,257 EUR-1,346

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false

ONCE boxtop = 0
ONCE boxbot = 0
ONCE boxset = 0
ONCE longmet = 0
ONCE shortmet = 0

myAtr = AverageTrueRange[14](close)
ema = ExponentialAverage[34](close)
corr = close + (close - ema)
zlma = ExponentialAverage[34](corr)

38 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
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 Box Retest 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 5 market and timeframe combinations. The best run was US Crude Oil, Daily, with a profit factor of 1.64 over 193 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,393 EUR at the tested position size, against a net result of 20,557 EUR.

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

Short Term RSI Pullback Long Short

Best run on the same market, US Crude Oil.

1.33 PF · 493 trades

Range Breakout Pending

Also a breakout strategy.

1.64 PF · 808 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