Join waitlist
Strategies / Pattern / Heikin Ashi Doji Supertrend Reversal

Heikin Ashi Doji Supertrend Reversal

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.

PatternLong & shortSwingDAX 404 hours
n/aProfit factor
1,185Net profit EUR
55.77%Win rate
104Trades
-335Max drawdown
11.40Avg trade

Best run of 5. DAX 40, 4 hours, spread 3, from run sweeps:2026-10-03-DAX40-4h-opt.tsv:24.

Entry rules, long

  1. Supertrend (ATR 15, factor 3.44) is in its uptrend state.
  2. The two prior Heikin Ashi candles are bearish, each with an upper wick no larger than 0.03 of its range.
  3. The current Heikin Ashi candle has a larger range than the prior candle.
  4. ADX(14) is at least 22, and volume is at least the 20-period EMA of volume.
  5. The latest confirmed Heikin Ashi swing low, using 5 bars on each side, is higher than the swing low before it.

Entry rules, short

  1. Supertrend (ATR 15, factor 3.44) is in its downtrend state.
  2. The two prior Heikin Ashi candles are bullish, each with a lower wick no larger than 0.03 of its range.
  3. The current Heikin Ashi candle has a larger range than the prior candle.
  4. ADX(14) is at least 22, and volume is at least the 20-period EMA of volume.
  5. The latest confirmed Heikin Ashi swing high, using 5 bars on each side, is lower than the swing high before it.

Exit rules

  1. The target is 1.0 times the stop distance from the entry.

Test conditions

PeriodUp to 2026-10-03
InstrumentDAX 40, 4 hours
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run4 hoursn/a 10455.771,185 EUR-335
DAX 40Dailyn/a 2161.901,456 EUR-487
FTSE 1004 hoursn/a 6855.88407 EUR-188
S&P 500Dailyn/a 3429.41168 EUR-103
GoldDailyn/a 2630.77144 EUR-38.20

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SuperTrendHeikin AshiADXEMAVolumeATR
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run Heikin Ashi Doji Supertrend Reversal in ProOrder?

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.

Which markets was it tested on?

It was tested on 5 market and timeframe combinations. The best run by trade count was DAX 40, 4 hours, with 104 trades.

How large was the drawdown?

The best run had a maximum drawdown of 335 EUR at the tested position size, against a net result of 1,185 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs