OPEN-SOURCE SCRIPT
Diupdate ICT by KG

# ICT by KG
### A Complete ICT Structure-Based Entry System
**ICT by KG** is a sophisticated Pine Script indicator that automates core ICT concepts, providing clear entry signals based on market structure, displacement, and premium/discount arrays.
## 🔍 Overview
This indicator combines multiple ICT concepts into one cohesive system:
- Market Structure (Swing Highs/Lows, Break of Structure)
- Displacement Detection (momentum candles with minimal wicks)
- PD Array Tracking (Fair Value Gaps & Order Blocks)
- Kill Zone Filtering (New York session)
- VWAP Integration (directional filter)
## 🎯 Core Logic
Signals are generated ONLY when ALL conditions align:
**LONG Entry:**
- Bullish Break of Structure (BOS) confirmed
- Bullish displacement detected (minimum consecutive bars)
- Price retraces into a bullish FVG or Order Block
- Within an active Kill Zone (optional)
- Price above VWAP (optional)
- CE (50% level) touch required (configurable)
**SHORT Entry:**
- Bearish Break of Structure (BOS) confirmed
- Bearish displacement detected
- Price retraces into a bearish FVG or Order Block
- Within an active Kill Zone (optional)
- Price below VWAP (optional)
- CE (50% level) touch required (configurable)
## ⚙️ Key Features
**Market Structure**
- Customizable swing length (3–20 bars)
- HTF bias timeframe reference
- Automatic BOS labels & background shading
**Displacement**
- ATR-based threshold + wick/body ratio filter
- Configurable minimum consecutive bars
- Highlighted bars for visual confirmation
**PD Arrays (FVG & Order Blocks)**
- FVG boxes appear after BOS
- Order Blocks = last opposite candle before displacement
- CE (50%) level requirement option
- Configurable lookback & display limits
**Kill Zone Filter**
- NY Kill Zone (7–10 AM ET) & NY Afternoon (1–4 PM ET)
- Optional enable/disable
**VWAP Integration**
- Session or Weekly reset
- Directional filter (longs > VWAP / shorts < VWAP)
## 📊 Visual Elements
- Swing Points: "H" (red) & "L" (green) labels
- BOS Labels: "BOS↑" (lime) & "BOS↓" (red)
- Displacement: Highlighted bars
- FVG/OB Boxes: Semi‑transparent green/red
- Entry Signals: "⚡ LONG" (lime) & "⚡ SHORT" (red) labels
- Background Shading: Subtle green/red for structure bias
## 📈 Heads‑Up Display (HUD)
A live info panel shows:
- Kill Zone status
- Market structure bias
- BOS age & status
- Displacement status
- PD Array activity
- VWAP relationship
- Action recommendation
## ⚡ Alerts
Built‑in alerts for:
- LONG Entry signals
- SHORT Entry signals
- Bullish Break of Structure
- Bearish Break of Structure
## 🛠️ Input Parameters
| Group | Parameter | Description |
|--------------------|-------------------------|--------------------------------------|
| Market Structure | Swing Length | Pivot sensitivity (3–20) |
| | HTF Bias Timeframe | Higher timeframe reference |
| | Show Swing Points | Toggle H/L labels |
| Displacement | ATR Multiplier | Displacement threshold (1.0–3.0) |
| | Max Wick/Body Ratio | Rejection filter (0.1–0.5) |
| | Min Displacement Bars | Consecutive bars required (1–5) |
| PD Arrays | Show FVG/OB | Toggle boxes |
| | Max to Track | Number of boxes displayed (3–20) |
| | Order Block Lookback | OB candle position (1–10) |
| | Require CE Tag | Force 50% level touch |
| VWAP | Show VWAP | Toggle VWAP line |
| | VWAP Reset | Session or Week |
| | VWAP Filter | Directional filter |
| Kill Zones | Enable Filter | Toggle time filter |
| | NY Kill Zone | NY session only |
| Colors | Bullish/Bearish Colors | Customize box colors |
## 📝 How to Use
1. Add to chart and adjust inputs as needed.
2. Watch the HUD – all conditions must align.
3. Entry signals appear when price taps into PD arrays.
4. Confirm with higher timeframe bias (optional).
5. Manage risk according to your trading plan.
## ⚠️ Disclaimer
This indicator is for educational and informational purposes only. It is not financial advice. Past performance does not guarantee future results. Always conduct your own analysis and risk management before trading.
---
**Version:** 1.0
**Author:** KG
**Based on:** ICT (Inner Circle Trader) Methodology
### A Complete ICT Structure-Based Entry System
**ICT by KG** is a sophisticated Pine Script indicator that automates core ICT concepts, providing clear entry signals based on market structure, displacement, and premium/discount arrays.
## 🔍 Overview
This indicator combines multiple ICT concepts into one cohesive system:
- Market Structure (Swing Highs/Lows, Break of Structure)
- Displacement Detection (momentum candles with minimal wicks)
- PD Array Tracking (Fair Value Gaps & Order Blocks)
- Kill Zone Filtering (New York session)
- VWAP Integration (directional filter)
## 🎯 Core Logic
Signals are generated ONLY when ALL conditions align:
**LONG Entry:**
- Bullish Break of Structure (BOS) confirmed
- Bullish displacement detected (minimum consecutive bars)
- Price retraces into a bullish FVG or Order Block
- Within an active Kill Zone (optional)
- Price above VWAP (optional)
- CE (50% level) touch required (configurable)
**SHORT Entry:**
- Bearish Break of Structure (BOS) confirmed
- Bearish displacement detected
- Price retraces into a bearish FVG or Order Block
- Within an active Kill Zone (optional)
- Price below VWAP (optional)
- CE (50% level) touch required (configurable)
## ⚙️ Key Features
**Market Structure**
- Customizable swing length (3–20 bars)
- HTF bias timeframe reference
- Automatic BOS labels & background shading
**Displacement**
- ATR-based threshold + wick/body ratio filter
- Configurable minimum consecutive bars
- Highlighted bars for visual confirmation
**PD Arrays (FVG & Order Blocks)**
- FVG boxes appear after BOS
- Order Blocks = last opposite candle before displacement
- CE (50%) level requirement option
- Configurable lookback & display limits
**Kill Zone Filter**
- NY Kill Zone (7–10 AM ET) & NY Afternoon (1–4 PM ET)
- Optional enable/disable
**VWAP Integration**
- Session or Weekly reset
- Directional filter (longs > VWAP / shorts < VWAP)
## 📊 Visual Elements
- Swing Points: "H" (red) & "L" (green) labels
- BOS Labels: "BOS↑" (lime) & "BOS↓" (red)
- Displacement: Highlighted bars
- FVG/OB Boxes: Semi‑transparent green/red
- Entry Signals: "⚡ LONG" (lime) & "⚡ SHORT" (red) labels
- Background Shading: Subtle green/red for structure bias
## 📈 Heads‑Up Display (HUD)
A live info panel shows:
- Kill Zone status
- Market structure bias
- BOS age & status
- Displacement status
- PD Array activity
- VWAP relationship
- Action recommendation
## ⚡ Alerts
Built‑in alerts for:
- LONG Entry signals
- SHORT Entry signals
- Bullish Break of Structure
- Bearish Break of Structure
## 🛠️ Input Parameters
| Group | Parameter | Description |
|--------------------|-------------------------|--------------------------------------|
| Market Structure | Swing Length | Pivot sensitivity (3–20) |
| | HTF Bias Timeframe | Higher timeframe reference |
| | Show Swing Points | Toggle H/L labels |
| Displacement | ATR Multiplier | Displacement threshold (1.0–3.0) |
| | Max Wick/Body Ratio | Rejection filter (0.1–0.5) |
| | Min Displacement Bars | Consecutive bars required (1–5) |
| PD Arrays | Show FVG/OB | Toggle boxes |
| | Max to Track | Number of boxes displayed (3–20) |
| | Order Block Lookback | OB candle position (1–10) |
| | Require CE Tag | Force 50% level touch |
| VWAP | Show VWAP | Toggle VWAP line |
| | VWAP Reset | Session or Week |
| | VWAP Filter | Directional filter |
| Kill Zones | Enable Filter | Toggle time filter |
| | NY Kill Zone | NY session only |
| Colors | Bullish/Bearish Colors | Customize box colors |
## 📝 How to Use
1. Add to chart and adjust inputs as needed.
2. Watch the HUD – all conditions must align.
3. Entry signals appear when price taps into PD arrays.
4. Confirm with higher timeframe bias (optional).
5. Manage risk according to your trading plan.
## ⚠️ Disclaimer
This indicator is for educational and informational purposes only. It is not financial advice. Past performance does not guarantee future results. Always conduct your own analysis and risk management before trading.
---
**Version:** 1.0
**Author:** KG
**Based on:** ICT (Inner Circle Trader) Methodology
Catatan Rilis
# ICT by KG v2 – with Inverse FVG Detection### Advanced ICT Structure-Based Entry System
**ICT by KG v2** is a comprehensive Pine Script indicator that automates core ICT concepts and adds powerful new features, including **Inverse Fair Value Gap (iFVG) detection**, to help you identify high‑probability entries based on market structure, displacement, and premium/discount arrays.
## 🔍 Overview
This indicator combines multiple ICT concepts into one cohesive system:
- Market Structure (Swing Highs/Lows, Break of Structure)
- Displacement Detection (momentum candles + volume confirmation)
- PD Array Tracking (Fair Value Gaps, Order Blocks, and now Inverse FVGs)
- Kill Zone Filtering (NY, London, Asia sessions)
- VWAP Integration (directional filter)
- Liquidity Sweep Detection (optional)
- Higher Timeframe Bias (optional)
- Signal Strength Meter & Risk Management Suggestions
## 🆕 New in v2.1 – Inverse Fair Value Gaps
- Automatically detects when a previously formed FVG is **touched and then broken with displacement**.
- Bullish iFVG (support flip) – price breaks **above** a bearish FVG with bullish displacement.
- Bearish iFVG (resistance flip) – price breaks **below** a bullish FVG with bearish displacement.
- iFVG boxes are drawn in **blue** (bullish) and **orange** (bearish) for easy identification.
- Separate color inputs let you customize iFVG appearance.
## 🎯 Core Logic
Signals are generated ONLY when ALL enabled conditions align:
**LONG Entry:**
- Bullish BOS confirmed
- Bullish displacement detected (min consecutive bars, optional volume)
- Price retraces into a bullish FVG or Order Block
- Within an active Kill Zone (optional)
- Price above VWAP (optional)
- HTF bias bullish (optional)
- Recent liquidity sweep (optional)
- CE (50%) level touch required (configurable)
**SHORT Entry:**
- Bearish BOS confirmed
- Bearish displacement detected
- Price retraces into a bearish FVG or Order Block
- Within an active Kill Zone
- Price below VWAP
- HTF bias bearish
- Recent liquidity sweep
- CE (50%) level touch required
## ⚙️ Key Features
**Market Structure**
- Customizable swing length (3–20)
- Automatic BOS labels & background shading
- Optional swing level lines
**Displacement**
- ATR‑based threshold + wick/body ratio filter
- Configurable minimum consecutive bars
- Optional volume confirmation
**PD Arrays (FVG, OB, iFVG)**
- FVG/OB boxes appear after BOS
- Order Blocks = last opposite candle before displacement
- CE (50%) level requirement & optional CE line
- Inverse FVGs automatically detected and highlighted
- Adjustable lookback & display limits
**Kill Zones**
- NY Morning (7‑10 AM ET) & NY Afternoon (1‑4 PM ET)
- London (2‑5 AM ET)
- Asia (7 PM‑12 AM ET)
- Any combination can be active
**VWAP Integration**
- Session or Weekly reset
- Directional filter (longs > VWAP / shorts < VWAP)
**Liquidity Sweep**
- Detects sweeps of recent swing high/low before BOS
**Higher Timeframe Bias**
- SMA on selected HTF to confirm trend direction
## 📊 Visual Elements
- Swing Points: "H" (red) & "L" (green) labels
- Swing Lines: Dotted horizontal lines at recent swing levels
- BOS Labels: "BOS↑" (lime) & "BOS↓" (red)
- Displacement: Highlighted bars
- FVG/OB Boxes: Semi‑transparent green/red with optional CE dashed line
- **iFVG Boxes**: Blue (bullish) / orange (bearish) with thicker border
- Entry Signals: "⚡ LONG" / "⚡ SHORT" labels with suggested SL/TP
- Background Shading: Subtle green/red for structure bias
## 📈 Heads‑Up Display (HUD)
A live info panel shows:
- Active Kill Zone
- Market structure bias
- BOS age & status
- Displacement status
- PD Array activity (including iFVG status not shown, but boxes are drawn)
- VWAP relationship
- HTF bias
- Signal strength (conditions met)
- Action recommendation
## ⚡ Alerts
Built‑in alerts for:
- LONG Entry signals
- SHORT Entry signals
- Bullish Break of Structure
- Bearish Break of Structure
## 📝 How to Use
1. Add to chart and adjust inputs to match your trading style.
2. Watch the HUD – all enabled conditions must show green.
3. Entry signals appear when price taps into PD arrays with suggested SL/TP.
4. **iFVG boxes** help you identify zones where previous support/resistance has flipped – these often act as new magnets for price.
5. Confirm with higher timeframe bias if enabled.
6. Manage risk according to your plan.
## ⚠️ Disclaimer
This indicator is for educational and informational purposes only. It is not financial advice. Past performance does not guarantee future results. Always conduct your own analysis and risk management before trading.
---
**Version:** 2.1
**Author:** KG
**Based on:** ICT (Inner Circle Trader) Methodology
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.