ICT session setup

A built-in setup: liquidity sweep in a session, structure shift with displacement, then a fair value gap retest.

Inside the session: a sweep of the prior session's or the last swing's low (wick below by sweep_k ATRs, close back above) → within mss_bars a close above the highest high of the internal_bars candles before the sweep on a bullish displacement candle → the fair value gap of that move → within retest_bars a candle that dips into the gap and closes above it = long_trigger. short_trigger is the mirror. It resets on a timeout, a close below the sweep or below both the gap and the OTE band, and at the session end. The OTE band is the ote_from–ote_to retracement of the frozen leg; on a trigger candle it is the band of the setup that triggered. stop_level = the swept extreme (the sweep candle's low for a long setup, high for a short) of the setup that last triggered, from its trigger candle to the session end (none when both sides trigger on one candle).

ICT session setup is a structure detector: it marks price structure on the chart and counts against the plan's detector limit.

Settings

SettingDefaultRangeWhat it does
sessionasiaasia, london, new_york, london_killzone, new_york_killzoneThe trading session (Admin › Settings › Trading sessions). Needs a small timeframe that divides the session times, e.g. 1m, 5m or 15m.
atr_period141 to 500ATR length (Wilder) for every buffer.
swing_k20.1 to 20Swing reversal in ATRs: a pivot is confirmed when a close moves this far back.
swing_min_pct0.10 to 10Smallest swing reversal, % of the close.
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.020 to 10Smallest buffer of this detector, % of the close (each buffer is the larger of this and its ATR multiple).
sweep_k0.10 to 5Sweep: the wick goes this many ATRs beyond the level (and the close comes back).
gap_k00 to 5Smallest fair value gap of the move, in ATRs.
internal_bars102 to 200Candles before the sweep whose highest high (lowest low) the shift must close beyond.
mss_bars101 to 200Candles after the sweep allowed for the market structure shift.
retest_bars201 to 500Candles after the gap allowed for the retest.
ote_from0.620 to 1Optimal trade entry band: start, as a retracement of the leg.
ote_to0.790 to 1Optimal trade entry band: end, as a retracement of the leg.
session_bars3001 to 5000Candles replayed at start so the prior session is known (at least one day of the node's timeframe: 5m = 288).

What it gives

OutputWhat it is
Long triggerTrue on the retest candle of a long setup.
Short triggerTrue on the retest candle of a short setup.
OTE band lowLow edge of the optimal trade entry band.
OTE band highHigh edge of the optimal trade entry band.
In the OTE bandTrue while the close is inside the optimal trade entry band.
Sweep stop levelThe swept extreme of the setup that last triggered (below a long, above a short): the stop beyond the sweep.

What it reads

It reads the whole candle (open, high, low, close and volume).

Warm-up

With its default settings, ICT session setup needs 541 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.

Related indicators

Built from: Displacement candle, Fair value gaps

Test it

Copy this sentence into the Algonney chat to backtest it:

Backtest a strategy on BTC that uses ICT session setup with its default settings