OPEN-SOURCE SCRIPT

FVG (Nephew sam remake)

145
Hello i am making my own FVG script inspired by Nephew Sam as his fvg code is not open source. My goal is to replicate his Script and then add in alerts and more functions. Thus, i spent few days trying to code. There is bugs such as lower time frame not showing higher time frame FVG.

This script automatically detects and visualizes Fair Value Gaps (FVGs) — imbalances between demand and supply — across multiple timeframes (15-minute, 1-hour, and 4-hour).

15m chart shows:
15m FVGs (green/red boxes)
1H FVGs (lime/maroon)
4H FVGs (faded green/red with borders) (Bugged For now i only see 1H appearing)

1H chart shows:
1H FVGs
4H FVGs

4H chart shows:
4H FVGs only

There is the function to auto close FVG when a future candle fully disrespected it.

You're welcome to:

🔧 Customize the appearance: adjust box colors, transparency, border style

🧪 Add alerts: e.g., when price enters or fills a gap

📅 Expand to Daily/Weekly: just copy the logic and plug in "D" or "W" as new layers

📈 Build confluence logic: combine this with order blocks, liquidity zones, or ICT concepts

🧠 Experiment with entry signals: e.g., candle confirmation on return to FVG

🚀 Improve performance: if you find a lighter way to track gaps, feel free to optimize!

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.