Buys when the close crosses above a swing high level, taken from the second most recent bar where the high crossed above the prior high. Closes the long when the close crosses below a swing low level, taken the same way from lows.
Best run of 8. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:79.
| Period | Up to 2026-10-12 |
| Instrument | Nasdaq 100, 4 hours |
| 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 |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | 4 hours | n/a | 1,460 | 38.08 | 9,863 EUR | -6,107 |
| Nikkei 225 | Daily | n/a | 578 | 39.45 | 39,721 USD | -24,175 |
| Nikkei 225 | 4 hours | n/a | 1,168 | 39.98 | 17,059 USD | -10,154 |
| Dow Jones | Daily | n/a | 662 | 38.67 | 16,860 EUR | -8,684 |
| Nasdaq 100 | Daily | n/a | 533 | 40.53 | 12,674 EUR | -4,216 |
| Brent Crude | 4 hours | n/a | 807 | 37.79 | 4,356 EUR | -4,317 |
| Gold | 4 hours | n/a | 1,443 | 37.49 | 3,477 EUR | -1,028 |
| S&P 500 | Daily | n/a | 691 | 39.36 | 2,493 EUR | -1,370 |
Charts
The code
// ============================================================== // Swing Level Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE hlast = 0 ONCE hprev = 0 ONCE hcnt = 0 ONCE llast = 0 ONCE lprev = 0 ONCE lcnt = 0
26 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 8 market and timeframe combinations. The best run by trade count was Nasdaq 100, 4 hours, with 1,460 trades.
The best run had a maximum drawdown of 6,107 EUR at the tested position size, against a net result of 9,863 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.