FeraTrading Multi-Timeframe FVG w/ Volume Filtering

This Fair Value Gap (FVG) indicator identifies bullish and bearish FVGs across up to 5 customizable timeframes—from intraday scalps to higher-timeframe confluences.
🔹 Volume-Filtered FVGs: Optionally filter for high-volume zones only, focusing on strong institutional interest.
🔹 Bullish & Bearish Toggles: Choose which setups you want to see.
🔹 Dynamic Gap Lengths: Gap size automatically scales with volume intensity using a smart multiplier.
🔹 Multi-Timeframe Support: Pulls FVGs from higher timeframes without cluttering your chart.
🔹 Color-Coded Zones: Easily distinguish between bullish and bearish areas with custom transparency.
Great for scalpers, day traders, and swing traders looking for precise entry zones backed by volume and structure.
We made this indicator open-source on purpose: So you can tweak it, improve it, or build on it. Whether you’re a developer or a trader with some coding skills, we want you to make it your own and help the tool evolve with the community. Mess with the volume logic or how the FVGs interact with candles, it is all setup for you to do so. If you are not a coder, enjoy using a great indicator!
This indicator was developed by FeraTrading to visualize market structure.
1. User Inputs for Timeframes:
The script defines up to five separate timeframe inputs (tf1, tf2, tf3, tf4, tf5).
Each timeframe has a toggle (enableTF1, enableTF2, etc.) so the user can enable or disable specific timeframes dynamically.
2. Determining Whether the Timeframe is Higher or Lower:
Inside the f_process_timeframe_custom function:
It compares the selected timeframe (tf_val) to the current chart’s timeframe (timeframe.multiplier).
If the selected timeframe is greater than the chart timeframe → it flags compositeNeeded = true (meaning higher timeframe behavior is required).
If not greater → it processes like normal lower timeframe data.
3. Lower Timeframe Processing (Same or Lower):
If compositeNeeded = false, it uses request.security() to pull standard high, low, close, and volume values.
Then it runs the standard FVG detection logic (f_processFVG) on every bar.
FVGs are drawn immediately based on the raw data.
4. Higher Timeframe Processing (Composite Needed = True):
If compositeNeeded = true, it uses request.security() to call a special higher timeframe FVG function (f_htf_fvg()).
f_htf_fvg() processes inside the higher timeframe and returns:
Volume strength
Bullish FVG condition
Bearish FVG condition
High and low prices
Additionally, the HTF bar’s time (htfTime) is pulled using request.security(time).
New FVGs are only processed once per new HTF candle — not every chart candle — by checking if htfTime != htfTime[1].
This prevents repainting and avoids overplotting for higher timeframes.
5. Drawing the FVG Boxes:
When a FVG condition is confirmed (bullish or bearish):
A box is created starting from the second bar before the gap (bar_index[2]) extending right based on a dynamic width calculated from volume (volCalc).
Volume filters are optionally applied if enabled by the user (HighVolume input).
All boxes are stored in an internal array boxesArray to track and manage them efficiently.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
See how at → FeraTrading.com
Use Code FIRST50 for 50% off any plan!
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
See how at → FeraTrading.com
Use Code FIRST50 for 50% off any plan!