It buys on a break above the highest high of the previous 55 bars and sells short on a break below the lowest low of the previous 55 bars. Longs close below the 20 bar low and shorts close above the 20 bar high.
Best run of 2. Brent Crude, Daily, spread 5, from run pf:2026-10-11-BRENT-D.tsv:7.
| Period | Up to 2026-10-11 |
| Instrument | Brent Crude, Daily |
| Spread | 5 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Brent CrudeBest run | Daily | 1.75 | 75 | 36.00 | 20,500 EUR | -11,283 |
| EUR/USD | Daily | 1.24 | 187 | 40.11 | 5,275 USD | -4,989 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // 55 Day Breakout Long Short // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE capital = 10000
24 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 2 market and timeframe combinations. The best run was Brent Crude, Daily, with a profit factor of 1.75 over 75 trades.
The best run had a maximum drawdown of 11,283 EUR at the tested position size, against a net result of 20,500 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.