OPEN-SOURCE SCRIPT
PDH/PDL + FVG + Order Blocks (Clean ICT)

**PDH/PDL + Session Highs/Lows + FVG + Order Blocks (Clean ICT)**
An all-in-one ICT/Smart Money toolkit that layers the core concepts traders use for daily bias and liquidity mapping onto a single, clean chart — no clutter, no repainting boxes, fully configurable.
**What it plots:**
📍 **Previous Day High / Low (PDH/PDL)**
Day boundary locked to a chosen timezone (defaults to New York midnight, the ICT standard), so the daily range always lines up with how ICT concepts are taught, regardless of your exchange's native session times.
🌏 **Asia / London / New York Session Highs & Lows**
Each session range builds live as price moves through it, then locks and stays on the chart once the session closes — giving you the classic liquidity pools traders watch for sweeps and reversals. All three sessions are fully customizable (time window, color) to match your own session definitions.
⚡ **Liquidity Sweep Tags (SFP)**
Automatically tags candles that wick through the prior day's high or low and close back inside it — a classic stop-hunt / failure-to-continue signal.
📊 **Fair Value Gaps (FVG)**
Detects 3-candle imbalances above a minimum size threshold (scaled to ATR, so it adapts across instruments and timeframes). Gaps auto-remove once fully filled, keeping the chart from filling up with stale zones.
🟦 **Order Blocks (OB)**
Marks the last opposing candle before a strong displacement move, with an ATR-based displacement filter and an optional "must leave an FVG" filter to cut down on noise. Blocks auto-remove once price closes through and mitigates them.
📈 **EMA**
A simple configurable EMA for trend context.
**Why it's different:**
- Everything is timezone-anchored, not just chart-timezone dependent — so PDH/PDL and session ranges stay accurate no matter what timezone your chart is displaying.
- Labels track live with price instead of sitting frozen back at the bar where a level formed, so the chart stays readable as new bars print.
- Old FVGs and Order Blocks clean themselves up once invalidated, instead of piling up indefinitely.
- Every color, threshold, and session window is adjustable from the settings panel — no code editing required.
**How to use it:**
1. Add the indicator and open Settings to toggle on/off any of the five modules (PDH/PDL, Sessions, FVG, Order Blocks, EMA).
2. Adjust the session time inputs to match the sessions you trade (defaults: Asia 20:00–00:00, London 02:00–05:00, New York 07:00–16:00, all in the day-boundary timezone).
3. Use the ATR-based thresholds to tune how many FVGs/Order Blocks show up — raise them for fewer, larger, higher-conviction zones; lower them to see more.
4. Watch for confluence: a liquidity sweep of PDH/PDL near a session high/low, followed by a fresh FVG or Order Block, is a common ICT-style setup.
**Notes:**
This script is for educational and analytical purposes and does not constitute financial advice. As with any tool, backtest and forward-test any strategy built around these concepts before trading live.
An all-in-one ICT/Smart Money toolkit that layers the core concepts traders use for daily bias and liquidity mapping onto a single, clean chart — no clutter, no repainting boxes, fully configurable.
**What it plots:**
📍 **Previous Day High / Low (PDH/PDL)**
Day boundary locked to a chosen timezone (defaults to New York midnight, the ICT standard), so the daily range always lines up with how ICT concepts are taught, regardless of your exchange's native session times.
🌏 **Asia / London / New York Session Highs & Lows**
Each session range builds live as price moves through it, then locks and stays on the chart once the session closes — giving you the classic liquidity pools traders watch for sweeps and reversals. All three sessions are fully customizable (time window, color) to match your own session definitions.
⚡ **Liquidity Sweep Tags (SFP)**
Automatically tags candles that wick through the prior day's high or low and close back inside it — a classic stop-hunt / failure-to-continue signal.
📊 **Fair Value Gaps (FVG)**
Detects 3-candle imbalances above a minimum size threshold (scaled to ATR, so it adapts across instruments and timeframes). Gaps auto-remove once fully filled, keeping the chart from filling up with stale zones.
🟦 **Order Blocks (OB)**
Marks the last opposing candle before a strong displacement move, with an ATR-based displacement filter and an optional "must leave an FVG" filter to cut down on noise. Blocks auto-remove once price closes through and mitigates them.
📈 **EMA**
A simple configurable EMA for trend context.
**Why it's different:**
- Everything is timezone-anchored, not just chart-timezone dependent — so PDH/PDL and session ranges stay accurate no matter what timezone your chart is displaying.
- Labels track live with price instead of sitting frozen back at the bar where a level formed, so the chart stays readable as new bars print.
- Old FVGs and Order Blocks clean themselves up once invalidated, instead of piling up indefinitely.
- Every color, threshold, and session window is adjustable from the settings panel — no code editing required.
**How to use it:**
1. Add the indicator and open Settings to toggle on/off any of the five modules (PDH/PDL, Sessions, FVG, Order Blocks, EMA).
2. Adjust the session time inputs to match the sessions you trade (defaults: Asia 20:00–00:00, London 02:00–05:00, New York 07:00–16:00, all in the day-boundary timezone).
3. Use the ATR-based thresholds to tune how many FVGs/Order Blocks show up — raise them for fewer, larger, higher-conviction zones; lower them to see more.
4. Watch for confluence: a liquidity sweep of PDH/PDL near a session high/low, followed by a fresh FVG or Order Block, is a common ICT-style setup.
**Notes:**
This script is for educational and analytical purposes and does not constitute financial advice. As with any tool, backtest and forward-test any strategy built around these concepts before trading live.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.