ICT PD Arrays [LunqFX] FVG, Displacement & Smart Money ZonesICT PD Arrays is a complete Smart Money Concepts toolkit built on the Inner
Circle Trader (ICT) methodology. It maps the full Price Delivery Array —
7 interconnected modules working together to identify where institutions
accumulate and distribute positions across any liquid market.
█ WHAT IT DOES
Most ICT indicators cover one concept in isolation — a Fair Value Gap, or
just Premium/Discount zones. This script combines all core PD Array
components into one cohesive system and ties them together with an ISD
state machine and a live HUD dashboard that shows full market context
at a glance.
Seven modules run simultaneously on every bar:
Fair Value Gaps (FVG) + Inversion FVG + Balanced Price Range (BPR)
Premium / Discount Zones + OTE Fibonacci Zones + Equilibrium Line
Displacement Detection with ATR and Volume confirmation
Inducement (IDM) — false breakout / liquidity trap detection
ISD Sequence state machine (Inducement → Sweep → Displacement)
Killzones — London, New York, Asian, Silver Bullet sessions
Live HUD Dashboard — all signals aggregated in real time
█ HOW IT DOES IT
FAIR VALUE GAPS
A Fair Value Gap is a 3-candle price imbalance where the gap between
candle 1's extreme and candle 3's extreme was never traded. Institutions
use these gaps as re-entry points — price gravitates back to fill them.
Detection uses a confirmed 3-candle structure with a bar offset so
the current live bar never creates a new FVG. No repainting.
An ATR(14)-based minimum size filter removes micro-gaps that carry no
significance. Raise the multiplier to see only strong imbalances.
Mitigation is tracked in real time. Once price crosses the CE midpoint
(Consequent Encroachment — the 50% level of the gap), the box fades.
When price fully passes through a gap it automatically converts to an
Inversion FVG (IFVG) — former support becomes resistance, box recolors.
Balanced Price Range (BPR) detects spatial overlap between the most
recent bullish FVG and bearish FVG. The overlap zone is where both
buyer and seller imbalances exist at the same price — the strongest
equilibrium area on the chart.
PREMIUM / DISCOUNT ZONES + OTE
ICT divides any dealing range into two halves: Premium (above 50%) where
institutions sell, and Discount (below 50%) where institutions buy.
Swing highs and lows are detected via pivot logic with a configurable
lookback. The range between the last confirmed pivot high and pivot low
becomes the active dealing range.
Two OTE zones are drawn using Fibonacci retracement logic:
OTE Buy zone — 21.4% to 38.2% from the low
= 61.8%–78.6% retracement FROM the swing high
= deepest discount, highest-probability long area
OTE Sell zone — 61.8% to 78.6% from the low
= deepest premium, highest-probability short area
Math:
OTE Buy Top = SwingLow + Range x 0.382
OTE Buy Bot = SwingLow + Range x 0.214
OTE Sell Top = SwingLow + Range x 0.786
OTE Sell Bot = SwingLow + Range x 0.618
Zones update automatically when new pivots are confirmed.
DISPLACEMENT
Displacement is not simply a large candle. In ICT theory it marks a
genuine shift of institutional order flow — it must show conviction.
Three conditions must all be satisfied simultaneously:
Body >= ATR(14) x multiplier (default 2.0)
Filters out average volatility, keeps only significant momentum.
Wick-to-range ratio below threshold (default 30%)
A large wick relative to range signals indecision, not displacement.
Formula: (High - Close) / Range for bulls,
(Close - Low) / Range for bears.
Optional volume filter: Volume > SMA(20) x 1.5
Confirms institutional participation behind the move.
Disable for spot Forex where tick volume is unreliable.
Displacement candles are the primary FVG trigger — the gap left behind
a displacement candle is the highest-quality FVG to trade.
INDUCEMENT (IDM)
Inducement is how institutions engineer a false breakout to grab
retail stop-loss liquidity before reversing price the other way.
Detected when price temporarily sweeps beyond a recent swing high or
low and then closes back inside the range. An ATR-based wick filter
ensures only meaningful sweeps qualify — micro-breakouts are excluded.
Bear Trap: price sweeps below a recent low and closes above it.
Bull Trap: price sweeps above a recent high and closes below it.
A 25-bar cooldown prevents label flooding in trending conditions.
The signal still feeds the ISD state machine on every bar regardless.
ISD SEQUENCE STATE MACHINE
ISD stands for Inducement, Sweep, Displacement. This is the complete
3-step institutional setup that ICT traders look for before entering.
The module runs as a persistent state machine tracking progress
across bars in real time:
Score 1/3 — IDM confirmed. Liquidity has been grabbed.
Score 2/3 — A structural sweep of a 5-bar high or low confirmed.
Score 3/3 — A Displacement candle fires in the same direction.
Label appears on chart. State resets automatically.
A 50-bar timeout resets the sequence if no follow-through occurs,
preventing stale signals from contaminating new setups.
ISD 3/3 is the single highest-confidence signal in this indicator.
All three institutional steps have completed in the correct order.
Dashboard shows live progress: Score 0 to 3 with block indicators.
KILLZONES
ICT defines specific time windows where institutional order flow
is at its highest. The script highlights four of them:
London Open 02:00 - 05:00 New York time
New York Open 08:30 - 11:00 New York time
Asian Session 20:00 - 00:00 New York time
Silver Bullet 10:00 - 11:00 New York time
The Silver Bullet is a specific 1-hour ICT window occurring inside
the New York session — considered one of the highest-probability
entry windows in the entire ICT model.
Killzones are automatically hidden on timeframes 4H and above.
LIVE HUD DASHBOARD
A real-time panel in the bottom-left corner aggregates all modules:
Zone current price position (PREMIUM / DISCOUNT / EQ)
with gradient background that shifts green to red
EQ Level exact equilibrium price of the current dealing range
Bull FVG count of active non-inverted bullish gaps
Bear FVG count of active non-inverted bearish gaps
BPR whether a Balanced Price Range is currently active
Displace direction of the most recent displacement candle
IDM most recent trap type — Bear Trap / Bull Trap / None
ISD Score live block progress from 0/3 to 3/3
ATR (14) current ATR value
Timeframe active chart timeframe
█ HOW TO USE
Recommended workflow for intraday setups on 1m to 1H timeframes.
Step 1
Check the dashboard Zone. If PREMIUM, look for short setups only.
If DISCOUNT, look for long setups only. Never trade against the zone.
Step 2
Wait for an IDM label. This confirms retail stop-loss liquidity has
been swept in the direction you are looking to trade.
Step 3
Watch the ISD score reach 2/3 — a structural sweep is confirmed in
the same direction as the IDM.
Step 4
When a Displacement candle fires and ISD reaches 3/3, the complete
institutional sequence is confirmed. This is the entry trigger.
Step 5
Enter on a retest of the FVG left by the displacement candle.
For the highest-precision entry, wait for price to reach the OTE
zone within the FVG (61.8%–78.6% retracement level).
Step 6
Use Killzones to time entries. Highest-probability window is the
Silver Bullet (10:00–11:00 NY). London and NY Open are second.
For higher timeframe analysis on 4H and Daily: use Premium/Discount
zones and swing structure only. Ignore Killzones and FVG entries.
█ SETTINGS GUIDE
Fair Value Gaps
Min FVG Size (ATR mult) raise to filter weak gaps, 0 shows all
Max FVGs to Show limits drawn gaps, default 5
Show CE Midline shows the 50% Consequent Encroachment level
Show Inverted FVG recolors box when price passes through fully
Show BPR draws overlap zone between bull and bear FVGs
PD Arrays
Swing Detection Length longer lookback gives bigger dealing ranges
Show OTE Zones draws the Fibonacci entry zones
Show Equilibrium Line draws the 50% midpoint with price label
Displacement
Body Size (x ATR) momentum threshold, raise for stronger signals
Max Wick/Range Ratio lower value requires cleaner committed candles
Volume Filter disable for Forex, enable for stocks/futures
Inducement
IDM Lookback Bars how far back to find the reference high/low
Min Wick Size (x ATR) raise to filter micro false-breakouts
ISD Sequence
Min Score to Show Label set to 3 to see only complete 3/3 setups
Killzones
Each session can be toggled independently.
█ ALERTS
Bullish FVG Formed
Bearish FVG Formed
Bullish Displacement — check for FVG entry
Bearish Displacement — check for FVG entry
Full ISD Sequence (3/3) — high-probability setup complete
Bullish Inducement (IDM) — Bear Trap detected
Bearish Inducement (IDM) — Bull Trap detected
█ TECHNICAL NOTES
All ta.* function calls — ATR, SMA, pivot highs/lows, highest, lowest —
are executed unconditionally at the top script level in compliance with
the Pine Script v6 execution model. Never inside conditionals or
functions called conditionally.
FVG detection is locked to barstate.isconfirmed with a bar offset.
The current live bar never creates a new FVG box. No repainting.
The ISD state machine uses persistent var variables with inline
assignment in the main execution body. Pine v6 does not allow global
variable reassignment inside functions, so the state machine runs
directly in the main script scope with a 50-bar timeout guard.
█ DISCLAIMER
This indicator is provided for educational and informational purposes
only. It does not constitute financial advice or a recommendation to
buy or sell any financial instrument. Past performance of any trading
concept or signal is not indicative of future results. All trading
involves risk. You are solely responsible for your own trading decisions.
Always use proper risk management.
© LunqFX
Chỉ báo Pine Script®






















