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

SettingDefaultRangeWhat it does
atr_period141 to 500ATR length (Wilder) for every buffer.
disp_k1.50.1 to 10Displacement: smallest body in ATRs.
close_frac0.250.01 to 0.5Displacement: the close lies in this top (bull) or bottom (bear) fraction of the range.
floor_pct0.050 to 10Smallest buffer of this detector, % of the close (each buffer is the larger of this and its ATR multiple).

What it gives

OutputWhat it is
Bullish displacementTrue on a bullish displacement candle.
Bearish displacementTrue 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