After two rising daily closes, the system looks for a bar that sets a new 5 bar low and then closes strong in its upper half. That shakeout is bought if price is above the 100 bar SMA, and the mirror image is sold short. Each trade has a 1.5% target, a 2.5% stop and a 6 bar time limit.
Best run of 6. EUR/USD, 4 hours, spread 1, from run sweeps:2026-09-24-EURUSD-4h-opt.tsv:7.
| Period | Up to 2026-09-24 |
| Instrument | EUR/USD, 4 hours |
| Spread | 1 points |
| Contracts | 1 |
| 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-09-24 |
| positionSize Contracts per trade | 1 |
| lookbackPeriod Bars for the recent high and low | 5 |
| trendPeriod Trend filter SMA length | 100 |
| maxBarsInTrade Time exit after this many bars | 6 |
| takeProfitPct Profit target, percent of entry price | 1.5 |
| stopLossPct Protective stop, percent of entry price | 2.5 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 4 hours | n/a | 459 | 54.90 | 14,192 USD | -10,393 |
| USD/JPY | Daily | n/a | 10 | 60.00 | 25,570 JPY | -19,860 |
| EUR/USD | Daily | n/a | 11 | 54.55 | 5,181 USD | -1,989 |
| DAX 40 | Daily | n/a | 8 | 87.50 | 665 EUR | -502 |
| S&P 500 | Daily | n/a | 11 | 63.64 | 159 EUR | -62.27 |
| Gold | Daily | n/a | 8 | 62.50 | 57.50 EUR | -21.50 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // Breakout Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade lookbackPeriod = 5 // bars for the recent high / low trendPeriod = 100 // trend filter SMA length maxBarsInTrade = 6 // time exit after this many bars takeProfitPct = 1.5 // profit target, percent of entry price stopLossPct = 2.5 // protective stop, percent of entry price // --- Indicators --- recentHigh = Highest[lookbackPeriod](high) recentLow = Lowest[lookbackPeriod](low) trendMA = Average[trendPeriod](close) dailyUpRun = DClose(1) > DClose(2) AND DClose(2) > DClose(3) dailyDownRun = DClose(1) < DClose(2) AND DClose(2) < DClose(3)
26 more lines: the entry and exit rules.
Read this first
Questions
Yes. Target, stop and the 6 bar time exit are all coded, so it runs without manual input.
The main test was EUR/USD 4 hours with 459 trades. Daily tests on USD/JPY, EUR/USD, DAX 40, S&P 500 and Gold were all positive but each had 11 trades or fewer.
The worst drawdown on EUR/USD 4 hours was 10,393 USD at 1 contract. Plan your account size around that number.
It produced enough signals to judge the idea. Daily bars gave only a handful of trades per market.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.