OPEN-SOURCE SCRIPT
ICT Ultimate Algorithmic Engine

This script, the ICT Ultimate Algorithmic Engine, is a comprehensive, all-in-one suite designed to automatically track and display the most critical time-based and price-based concepts taught by ICT (Inner Circle Trader) directly on your TradingView chart.
Since ICT emphasizes Time and Price (with Time coming first), the script is heavily structured around specific New York (EST) time windows and algorithmic delivery cycles.
Here is a breakdown of the 7 core engines running inside this script:
1. Killzones & Sessions Engine
The script paints custom background colors to highlight the major algorithmic trading windows throughout the day:
Asian Session (20:00 - 00:00 EST): Purple background.
London Killzone (02:00 - 05:00 EST): Blue background.
New York AM Killzone (07:00 - 10:00 EST): Orange background.
London Close (11:00 - 13:00 EST): Red background.
2. Algorithmic Macros
ICT teaches that specific 20-minute to 40-minute "macro" windows exist where the algorithm aggressively hunts liquidity or seeks fair value. The script explicitly highlights these macros (e.g., 08:30-09:00, 09:50-10:10, 10:50-11:10) with distinct background shading so you know exactly when volatility injections are scheduled.
3. True Opens (Midnight & 08:30 EST)
The algorithm uses daily true opens as its equilibrium to determine Premium and Discount.
It automatically plots a dashed Midnight Open line and an 08:30 AM Open line every single day. If price is above these lines, you are in a premium (favorable for sells); if below, a discount (favorable for buys).
4. Silver Bullet Tracker
This is a fully automated structural scanner for the ICT Silver Bullet setups.
It tracks the highest high and lowest low preceding the 3 Silver Bullet hours (London 03:00-04:00, NY AM 10:00-11:00, NY PM 14:00-15:00).
It draws red and green target lines representing the Buy-Side Liquidity (BSL) and Sell-Side Liquidity (SSL) targets for that specific hour.
Once the price touches one of these targets during the Silver Bullet hour, it actively labels it as BSL/SSL Swept.
5. Judas Swing & Market Structure Shift (MSS)
Judas Swing: The script tracks the high and low established during the Opening Ranges (00:00-01:00 for London, 08:30-09:30 for NY). If price manipulates above or below these boundaries and violently rejects, it prints a "Judas Swing" label, catching the classic algorithmic trap.
MSS with Displacement: It identifies Market Structure Shifts (MSS) but strictly filters them. It will only label an MSS if the candle breaks a recent swing high/low with displacement (the candle body size must be larger than 1.5x the ATR) AND leaves behind a Fair Value Gap.
6. Dynamic PD Arrays (Smart Money Concepts)
The script continuously scans for and draws institutional reference points:
Fair Value Gaps (FVGs): Draws bullish (BISI) and bearish (SIBI) gaps.
Inversion Feature: If a candle closes completely through an active FVG, the script automatically changes its color and converts it into an Inversion FVG (IFVG).
Order Blocks & Breakers: Draws standard +OB and -OBs.
Breaker Feature: If an Order Block was responsible for sweeping liquidity and is subsequently broken by price, it converts the Order Block into a Mitigation Block (MB) or a Breaker Block (BRK).
Volume Imbalances (VI): Highlights gaps between candle bodies (where only wicks overlap) in purple, automatically fading them out once they are mitigated.
Rejection Blocks: Identifies and highlights massive wicks (longer than 2x the body) acting as liquidity sponges.
7. Performance Cleanup (Garbage Collector)
Because TradingView limits users to 500 boxes and lines, the script has a built-in memory management system (the DYNAMIC DRAWING CLEANUP section at the bottom). It restricts the arrays to only hold the 100 most recent FVGs, Order Blocks, and Volume Imbalances, gracefully deleting the oldest ones to ensure the script never crashes or lags your chart.
Since ICT emphasizes Time and Price (with Time coming first), the script is heavily structured around specific New York (EST) time windows and algorithmic delivery cycles.
Here is a breakdown of the 7 core engines running inside this script:
1. Killzones & Sessions Engine
The script paints custom background colors to highlight the major algorithmic trading windows throughout the day:
Asian Session (20:00 - 00:00 EST): Purple background.
London Killzone (02:00 - 05:00 EST): Blue background.
New York AM Killzone (07:00 - 10:00 EST): Orange background.
London Close (11:00 - 13:00 EST): Red background.
2. Algorithmic Macros
ICT teaches that specific 20-minute to 40-minute "macro" windows exist where the algorithm aggressively hunts liquidity or seeks fair value. The script explicitly highlights these macros (e.g., 08:30-09:00, 09:50-10:10, 10:50-11:10) with distinct background shading so you know exactly when volatility injections are scheduled.
3. True Opens (Midnight & 08:30 EST)
The algorithm uses daily true opens as its equilibrium to determine Premium and Discount.
It automatically plots a dashed Midnight Open line and an 08:30 AM Open line every single day. If price is above these lines, you are in a premium (favorable for sells); if below, a discount (favorable for buys).
4. Silver Bullet Tracker
This is a fully automated structural scanner for the ICT Silver Bullet setups.
It tracks the highest high and lowest low preceding the 3 Silver Bullet hours (London 03:00-04:00, NY AM 10:00-11:00, NY PM 14:00-15:00).
It draws red and green target lines representing the Buy-Side Liquidity (BSL) and Sell-Side Liquidity (SSL) targets for that specific hour.
Once the price touches one of these targets during the Silver Bullet hour, it actively labels it as BSL/SSL Swept.
5. Judas Swing & Market Structure Shift (MSS)
Judas Swing: The script tracks the high and low established during the Opening Ranges (00:00-01:00 for London, 08:30-09:30 for NY). If price manipulates above or below these boundaries and violently rejects, it prints a "Judas Swing" label, catching the classic algorithmic trap.
MSS with Displacement: It identifies Market Structure Shifts (MSS) but strictly filters them. It will only label an MSS if the candle breaks a recent swing high/low with displacement (the candle body size must be larger than 1.5x the ATR) AND leaves behind a Fair Value Gap.
6. Dynamic PD Arrays (Smart Money Concepts)
The script continuously scans for and draws institutional reference points:
Fair Value Gaps (FVGs): Draws bullish (BISI) and bearish (SIBI) gaps.
Inversion Feature: If a candle closes completely through an active FVG, the script automatically changes its color and converts it into an Inversion FVG (IFVG).
Order Blocks & Breakers: Draws standard +OB and -OBs.
Breaker Feature: If an Order Block was responsible for sweeping liquidity and is subsequently broken by price, it converts the Order Block into a Mitigation Block (MB) or a Breaker Block (BRK).
Volume Imbalances (VI): Highlights gaps between candle bodies (where only wicks overlap) in purple, automatically fading them out once they are mitigated.
Rejection Blocks: Identifies and highlights massive wicks (longer than 2x the body) acting as liquidity sponges.
7. Performance Cleanup (Garbage Collector)
Because TradingView limits users to 500 boxes and lines, the script has a built-in memory management system (the DYNAMIC DRAWING CLEANUP section at the bottom). It restricts the arrays to only hold the 100 most recent FVGs, Order Blocks, and Volume Imbalances, gracefully deleting the oldest ones to ensure the script never crashes or lags your chart.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。