OPEN-SOURCE SCRIPT

FVG+OB Hunter -Free- [AlgoTrader Pro]

1 601
FVG + OB Hunter (Free) [AlgoTraderPro]

Fair Value Gaps and Order Blocks are the foundation of Smart Money Concepts trading. This free indicator detects both automatically, draws them on your chart, and tracks each zone until it is mitigated—so you always know which support and resistance zones are still live.

Core functions
  • Detects Bullish and Bearish Fair Value Gaps (3-candle imbalances) and marks them as support/resistance zones
  • Identifies Supply and Demand Order Blocks—the last opposing candle before a strong impulse move
  • Extends each zone to the right with semi-transparent boxes and auto-deletes it when mitigated
  • Live Nearest-Zones table: the closest zones above and below price, with entry, range and distance


How detection works

A Bearish FVG forms when the current candle's high is below the low two bars prior; a Bullish FVG when the current low is above the high two bars prior. When a gap forms, the indicator scans back up to OB Scan Lookback bars (default 10) for the last opposing candle—its body becomes the Order Block. Each zone extends right with every bar and is removed when price closes through it (invalidated) or closes beyond the far edge after entry (mitigated). Only unmitigated, live zones stay on the chart.

The Nearest-Zones table

Four rows—nearest Bear FVG and Supply OB above, nearest Bull FVG and Demand OB below—sorted by distance to price. Columns: ZONE | ENTRY | RANGE | DIST, where ENTRY is the near edge and DIST is the percent distance from the current close. Positionable in any corner.

Settings

Show Bearish FVG · Show Bullish FVG · Show Order Blocks · Show Nearest-Zones Table · zone colours · Extension Transparency (60–99) · OB Scan Lookback (3–50, how far back the opposing OB candle is sought) · Table Position. All inputs carry tooltips.

How to use it

The near edge (ENTRY) of an unmitigated zone is a support/resistance reference—for limit entries, for placing protective stops just beyond a zone, or simply to see where price is likely to react. The table keeps the nearest levels and their distances in view at all times.

Credits & compatibility

Fair Value Gaps and Order Blocks are Smart Money Concepts popularised by the ICT / SMC community. This is an original, independent PineScript v6 implementation of those concepts; no third-party code is used. Works on all assets and all timeframes and is compatible with all TradingView plans.

This is the free edition. An extended edition that additionally grades each zone (A / B / C), tags it by trend and volume, highlights the strongest confluence setups, and fires alerts is also available.

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.