Fair Value Gap - FVG - Histogram
Apr 8, 2023

The Fair Value Gap - FVG - Histogram indicator visualizes the magnitude of three-bar price gaps using a histogram and bar chart to help traders identify significant displacement in price action.
Usage
The indicator can be used to identify areas of liquidity imbalance or market inefficiency. The main output is a bar chart at the bottom of the screen representing the relative magnitude (percent rank) of Fair Value Gaps.
- Identifying Key Levels: Large histogram bars (often marked with a lightbulb icon) indicate "shock" FVGs where the displacement is significantly higher than recent history. These often act as magnetic zones or key support/resistance levels.
- Trend Confirmation: Upward gaps (green) indicate bullish displacement, while downward gaps (red) indicate bearish displacement.
- Gap Distribution: A separate histogram is plotted to the right of the price action, showing the frequency distribution of FVG sizes. This helps traders understand if the current gap is an outlier or a common occurrence.
Details
This script calculates the displacement between three consecutive candles. A bullish FVG occurs when the low of the current candle is higher than the high of the candle two periods ago. A bearish FVG occurs when the high of the current candle is lower than the low of the candle two periods ago.
Unlike traditional price-chart FVG indicators that draw boxes, this tool uses a histogram-style approach. This allows for a clearer comparison of data points side-by-side, making it easier to filter out minor "noise" gaps and focus on high-magnitude displacements. The indicator includes a 1-bar delay to ensure the gap is confirmed by a closed candle.
Settings
Bar Chart - Percent Rank
- Up move / Down move: Customizes the colors for bullish and bearish displacement bars.
- Lookback: Largest FVG: Determines the window of bars used to calculate the relative magnitude and identify "shock" signals.
- Make bars transparent: When enabled, reduces the visibility of insignificant FVGs to focus on major moves.
- Show info label: Displays a label indicating the lookback period used for signals.
Histogram - Recent gaps
- Show histogram: Toggles the distribution histogram on the right side of the chart.
- No. of observations: Sets the number of recent FVGs to include in the frequency distribution.
- No. of bins: Adjusts the granularity of the histogram distribution.
- Show frequency table info: Displays raw data regarding the FVG distribution.
- Filter signals: An optional filter that only triggers alerts if the FVG falls outside the most common (smallest) bin size.
FAQ
How do I access Fair Value Gap - FVG - Histogram?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Does this indicator repaint?
No, the indicator plots bars only after a candle has closed and the Fair Value Gap is confirmed. It uses a one-bar delay to ensure signal validity.
Can this be used on Renko charts?
This indicator is designed for time-based charts. On Renko charts with fixed brick sizes, the displacement between highs and lows is typically zero or constant, meaning FVGs will not be detected.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.