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.
Best run of 5. US Crude Oil, Daily, spread 3, from run pf:2026-10-12-CRUDE-D.tsv:1.
| Period | Up to 2026-10-12 |
| Instrument | US Crude Oil, Daily |
| Spread | 3 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | Daily | 1.64 | 193 | 44.04 | 20,557 EUR | -3,393 |
| USD/JPY | Daily | 1.46 | 209 | 44.02 | 17,580 USD | -4,230 |
| Silver | 4 hours | n/a | 521 | 36.85 | 22,236 USD | -11,396 |
| Nasdaq 100 | Daily | n/a | 186 | 33.87 | 11,184 EUR | -5,634 |
| S&P 500 | Daily | n/a | 252 | 31.75 | 2,257 EUR | -1,346 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // 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
Questions
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.
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.
The best run had a maximum drawdown of 3,393 EUR at the tested position size, against a net result of 20,557 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.