Buys when price sweeps below the prior 10-bar low, closes back above it with a bullish rejection candle, and the trend is up. Shorts the mirror setup in a downtrend, with a stop at the recent 5-bar extreme and target equal to risk.
Best run of 3. US Crude Oil, 4 hours, spread 3, from run sweeps:2026-10-03-CRUDE-4h-opt.tsv:16.
| Period | Up to 2026-10-03 |
| Instrument | US Crude Oil, 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | 4 hours | n/a | 152 | 51.97 | 1,412 EUR | -1,207 |
| Nikkei 225 | 4 hours | n/a | 141 | 51.06 | 2,950 USD | -2,880 |
| Gold | Daily | n/a | 58 | 46.55 | 337 EUR | -309 |
Charts
The code
// ============================================================== // Liquidity Sweep Rejection Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE lastbuy = -1000 ONCE lastsell = -1000 emafast = ExponentialAverage[50](close) emaslow = ExponentialAverage[200](close) myAtr = AverageTrueRange[14](close)
49 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 3 market and timeframe combinations. The best run by trade count was US Crude Oil, 4 hours, with 152 trades.
The best run had a maximum drawdown of 1,207 EUR at the tested position size, against a net result of 1,412 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.