OPEN-SOURCE SCRIPT
FVG+OB Hunter -Free- [AlgoTrader Pro]

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
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.
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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Code. Structure. Execution. Zones and flows from a live algorithmic trading desk. algotraderpro.io
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Code. Structure. Execution. Zones and flows from a live algorithmic trading desk. algotraderpro.io
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。