OPEN-SOURCE SCRIPT
ICT FVG Buy/Sell Signals

This bot is built on ICT (Inner Circle Trader) concepts such as:
Fair Value Gaps (FVGs) – imbalance zones between candles.
Consequent Encroachment (CE) – the midpoint of a gap.
Premium / Discount Arrays – dealing ranges split into premium (sell-side) and discount (buy-side) zones.
Displacement candles – strong impulsive moves that confirm intent.
The bot scans for FVGs, marks CE levels, and waits for price to return to these levels.
When price revisits a valid FVG zone with displacement confirmation and in the correct PD array, the bot generates a BUY or SELL signal.
✅ Signal Rules
Buy Signal
Price trades back into a Bullish FVG.
Current bar shows bullish displacement (large bullish body relative to ATR).
Price is in discount territory of the current dealing range (if PD filter is enabled).
Close is above the CE line of the FVG.
Sell Signal
Price trades back into a Bearish FVG.
Current bar shows bearish displacement.
Price is in premium territory of the current dealing range.
Close is below the CE line of the FVG.
🎯 What You’ll See on the Chart
Green “BUY” labels below candles when long signals trigger.
Red “SELL” labels above candles when short signals trigger.
Shaded background:
Red = Premium zone (sell side).
Teal = Discount zone (buy side).
Yellow line = dealing range midpoint (equilibrium).
Dots on CE lines = midpoints of the latest bullish/bearish FVG.
🔔 Alerts
ICT Buy → Triggers when a bullish setup confirms.
ICT Sell → Triggers when a bearish setup confirms.
You can connect these alerts to:
TradingView notifications.
Webhooks (for brokers or bots like MetaTrader, NinjaTrader, or Discord).
⚙️ Settings
Swing length – how many bars to use when detecting swing highs/lows for the dealing range.
Use PD filter – toggle ON/OFF for requiring discount/premium alignment.
Displacement ATR multiple – how strong the candle body must be compared to ATR to count as a displacement.
ATR length – used for displacement filter.
📈 Supported Markets
Works on all symbols and timeframes.
Commonly applied to:
NASDAQ (NQ, QQQ)
S&P500 (ES, SPX, SPY)
Forex pairs
Crypto (BTC, ETH, etc.)
⚠️ Disclaimer
This bot is for educational purposes only. It does not guarantee profits and should be tested on demo accounts first.
Always apply proper risk management before trading live.
Fair Value Gaps (FVGs) – imbalance zones between candles.
Consequent Encroachment (CE) – the midpoint of a gap.
Premium / Discount Arrays – dealing ranges split into premium (sell-side) and discount (buy-side) zones.
Displacement candles – strong impulsive moves that confirm intent.
The bot scans for FVGs, marks CE levels, and waits for price to return to these levels.
When price revisits a valid FVG zone with displacement confirmation and in the correct PD array, the bot generates a BUY or SELL signal.
✅ Signal Rules
Buy Signal
Price trades back into a Bullish FVG.
Current bar shows bullish displacement (large bullish body relative to ATR).
Price is in discount territory of the current dealing range (if PD filter is enabled).
Close is above the CE line of the FVG.
Sell Signal
Price trades back into a Bearish FVG.
Current bar shows bearish displacement.
Price is in premium territory of the current dealing range.
Close is below the CE line of the FVG.
🎯 What You’ll See on the Chart
Green “BUY” labels below candles when long signals trigger.
Red “SELL” labels above candles when short signals trigger.
Shaded background:
Red = Premium zone (sell side).
Teal = Discount zone (buy side).
Yellow line = dealing range midpoint (equilibrium).
Dots on CE lines = midpoints of the latest bullish/bearish FVG.
🔔 Alerts
ICT Buy → Triggers when a bullish setup confirms.
ICT Sell → Triggers when a bearish setup confirms.
You can connect these alerts to:
TradingView notifications.
Webhooks (for brokers or bots like MetaTrader, NinjaTrader, or Discord).
⚙️ Settings
Swing length – how many bars to use when detecting swing highs/lows for the dealing range.
Use PD filter – toggle ON/OFF for requiring discount/premium alignment.
Displacement ATR multiple – how strong the candle body must be compared to ATR to count as a displacement.
ATR length – used for displacement filter.
📈 Supported Markets
Works on all symbols and timeframes.
Commonly applied to:
NASDAQ (NQ, QQQ)
S&P500 (ES, SPX, SPY)
Forex pairs
Crypto (BTC, ETH, etc.)
⚠️ Disclaimer
This bot is for educational purposes only. It does not guarantee profits and should be tested on demo accounts first.
Always apply proper risk management before trading live.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.