It buys after two bearish Heikin Ashi candles and a doji, in a Supertrend uptrend with ADX(14) at least 22. Shorts mirror this, with a stop at the signal candle extreme and a target equal to that risk.
Best run of 5. DAX 40, 4 hours, spread 3, from run sweeps:2026-10-03-DAX40-4h-opt.tsv:24.
| Period | Up to 2026-10-03 |
| Instrument | DAX 40, 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 |
|---|---|---|---|---|---|---|
| DAX 40Best run | 4 hours | n/a | 104 | 55.77 | 1,185 EUR | -335 |
| DAX 40 | Daily | n/a | 21 | 61.90 | 1,456 EUR | -487 |
| FTSE 100 | 4 hours | n/a | 68 | 55.88 | 407 EUR | -188 |
| S&P 500 | Daily | n/a | 34 | 29.41 | 168 EUR | -103 |
| Gold | Daily | n/a | 26 | 30.77 | 144 EUR | -38.20 |
Charts
The code
// ============================================================== // Heikin Ashi Doji Supertrend Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE haopen = 0 ONCE fub = 0 ONCE flb = 0 ONCE dir = 1 ONCE lastsh = 0 ONCE lastshb = 0 ONCE shcount = 0 ONCE lastsl = 0 ONCE lastslb = 0 ONCE slcount = 0 haclose = (open + high + low + close) / 4 IF BarIndex = 0 THEN haopen = (open + close) / 2 ELSE haopen = (haopen[1] + haclose[1]) / 2 ENDIF hahigh = max(high, max(haopen, haclose)) halow = min(low, min(haopen, haclose)) myAtr = AverageTrueRange[15](close) ub = MedianPrice + 3.44 * myAtr lb = MedianPrice - 3.44 * myAtr
105 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, 4 hours, with 104 trades.
The best run had a maximum drawdown of 335 EUR at the tested position size, against a net result of 1,185 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.