Join waitlist
Strategies / Pattern / Hammer And Hanging Man Reversal

Hammer And Hanging Man Reversal

It buys on a hammer candle, a small body bar with a long lower wick and a green close, and sells short on the mirror hanging man. Any open position closes once 26 bars have passed since entry.

PatternLong & shortIntradayDow Jones30 min
n/aProfit factor
10,266Net profit EUR
48.27%Win rate
1,355Trades
-7,845Max drawdown
7.58Avg trade

Best run of 6. Dow Jones, 30 min, spread 3, from run sweeps:2026-10-12-DOW30-30m-opt.tsv:13.

Entry rules, long

  1. The lower wick is at least as long as the body, and the upper wick is no longer than the body.
  2. The close is above the open.
  3. Signals are checked only after bar 1 and only when no long position is open.

Entry rules, short

  1. The close is below the open.
  2. Signals are checked only after bar 1 and only when no short position is open.

Exit rules

  1. A short position closes at market once 26 bars have passed since its entry bar.

Test conditions

PeriodUp to 2026-10-12
InstrumentDow Jones, 30 minutes
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Dow JonesBest run30 minn/a 1,35548.2710,266 EUR-7,845
Nikkei 2254 hoursn/a 48646.3017,044 USD-10,859
DAX 40Dailyn/a 19247.9213,131 EUR-6,382
US Crude Oil4 hoursn/a 32249.696,407 EUR-3,986
Gold4 hoursn/a 49451.621,247 EUR-901
GoldDailyn/a 21058.101,059 EUR-867

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Hammer And Hanging Man Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Pattern
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE entrybar = 0
ONCE lastpos = 0

body = ABS(close - open)
height = high - low
lower = MIN(open, close) - low
upper = high - MAX(open, close)

28 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.
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 7,845 EUR is large next to the net profit of 10,266 EUR.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Hammer And Hanging Man 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 6 market and timeframe combinations. The best run by trade count was Dow Jones, 30 minutes, with 1,355 trades.

How large was the drawdown?

The best run had a maximum drawdown of 7,845 EUR at the tested position size, against a net result of 10,266 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Turtle Trade

Best run on the same market, Dow Jones.

2.42 PF · 6,324 trades

Breakout Reversal

Also a pattern strategy.

n/a PF · 459 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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