Displacement candle
A strong candle with a large body that closes near its high or low.
Displacement: bull when close > open, body ≥ max(floor_pct % × close, disp_k × ATR before the candle) and the close is in the top close_frac of the range; bear is the mirror. A zero-range candle is never one.
Displacement candle is a structure detector: it marks price structure on the chart and counts against the plan's detector limit.
Settings
| Setting | Default | Range | What it does |
|---|---|---|---|
| atr_period | 14 | 1 to 500 | ATR length (Wilder) for every buffer. |
| disp_k | 1.5 | 0.1 to 10 | Displacement: smallest body in ATRs. |
| close_frac | 0.25 | 0.01 to 0.5 | Displacement: the close lies in this top (bull) or bottom (bear) fraction of the range. |
| floor_pct | 0.05 | 0 to 10 | Smallest buffer of this detector, % of the close (each buffer is the larger of this and its ATR multiple). |
What it gives
| Output | What it is |
|---|---|
| Bullish displacement | True on a bullish displacement candle. |
| Bearish displacement | True on a bearish displacement candle. |
What it reads
It reads the whole candle (open, high, low, close and volume).
Warm-up
With its default settings, Displacement candle needs 141 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.
Related indicators
Used to build: ICT session setup
Test it
Copy this sentence into the Algonney chat to backtest it:
Backtest a strategy on BTC that uses Displacement candle with its default settings