Hanging Man
By LuxAlgoJul 19, 2026
Hanging Man finds the uptrend's uneasy candle — a small body near the session high over a long lower shadow — and runs it through the full classical lifecycle — the library's first complete treatment of the hanging man. Detection demands a preceding advance, so the identical shape at the bottom of a decline is never mislabeled. Each pattern draws a dashed trigger at the body bottom and a dashed stop at the pattern high.
How to Trade the Hanging Man?
- Label prints: the session broke sharply lower before the close was hauled back — after an advance, the first hint that supply can move this market. An alert fires, but the pattern is not yet active.
- Confirmation triangle: a close below the pattern body within the window activates the bearish reading; the pattern high becomes the working stop.
- Invalidation x-cross: any new high above the pattern high restores the uptrend reading, before or after confirmation.
The invalidation check runs first on a bar that does both, so a poke to new highs voids the pattern even if that same bar later breaks down.
Hanging Man Settings
- Minimum Lower Shadow / Body Ratio (default 2): how deep the intraday break must run versus the body.
- Maximum Body Size % (default 30) and Maximum Upper Shadow % (default 10): keep the body compact and pinned near the high.
- Body Color (default Any): switch to Down-Close Only for the marginally more bearish variant.
- Advance SMA Length (default 50): the prior bar must close above this average.
- Require Elevated Volume (default disabled) with Minimum Volume (default 1.5) x SMA (default 20).
- Confirmation Window (Bars) (default 3) and Post-Confirmation Stop Tracking (Bars) (default 20).
- Display toggles — Show Pattern Labels and Trigger & Stop Levels (default enabled), Highlight Pattern Candles and Show Trend Basis (default disabled).
Frequently Asked Questions
Is a hanging man just a hammer at the top?
Shape-wise, yes — the label changes with location. After a decline the candle reads bullish; after an advance it warns instead. The advance requirement means this build only ever reports the bearish case.
How does it compare with the Gravestone Doji?
Both are topping alerts after advances, but the rejection sits on opposite sides. The Gravestone Doji build records higher prices offered and refused through its upper shadow; the hanging man records a deep break lower that was bought back.
Does the candle's color matter?
Only marginally. Both closes qualify classically, a down-close keeping slightly more of the sellers' intraday gains — which is why Any is the default and confirmation carries the real weight.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
