The strategy waits for a long-legged doji candle, then buys when close rises above that doji's high or sells short when close falls below its low. Longs close when price crosses below a 20-period average, and shorts close when price crosses above it.
Best run of 5. DAX 40, 15 min, spread 3, from run sweeps:2026-10-12-DAX40-15m-opt.tsv:8.
| Period | Up to 2026-10-12 |
| Instrument | DAX 40, 15 minutes |
| 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 |
|---|---|---|---|---|---|---|
| DAX 40Best run | 15 min | n/a | 85 | 35.29 | 595 EUR | -434 |
| Silver | 4 hours | n/a | 17 | 76.47 | 4,620 USD | -780 |
| Silver | Daily | n/a | 4 | 100.00 | 1,233 USD | -264 |
| DAX 40 | 4 hours | n/a | 6 | 83.33 | 534 EUR | -144 |
| US Crude Oil | 1 min | n/a | 40 | 32.50 | 252 EUR | -173 |
Charts
The code
// ============================================================== // Long Legged Doji Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 15 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE dh = 0 ONCE dl = 0 ONCE wait = 0 myAtr = AverageTrueRange[14](close) sma = Average[20](close) body = abs(close - open) rng = high - low upw = high - max(open, close) myLow = min(open, close) - low
32 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 5 market and timeframe combinations. The best run by trade count was DAX 40, 15 minutes, with 85 trades.
The best run had a maximum drawdown of 434 EUR at the tested position size, against a net result of 595 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.