The strategy buys at market after the close has risen for two bars, the 14-period stochastic %K is above 50 and below its 3-period average, and a key reversal up bar forms. It closes the long when either condition no longer holds.
Best run of 1. Brent Crude, Daily, spread 3, from run sweeps:2026-10-11-BRENT-D-opt.tsv:53.
| Period | Up to 2026-10-11 |
| Instrument | Brent Crude, 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Brent CrudeBest run | Daily | n/a | 422 | 51.66 | 3,408 EUR | -1,966 |
Charts
The code
// ============================================================== // Key Reversal Up With Stochastic // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ll = lowest[14](low) hh = highest[14](high)
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 one combination, Brent Crude, Daily, with 422 trades.
The best run had a maximum drawdown of 1,966 EUR at the tested position size, against a net result of 3,408 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.