Fair Value Gap Volume Profile Pro
- インディケータ
- Hocine Saidani
- バージョン: 1.0
- アクティベーション: 20
Fair Value Gap Volume Profile Pro
This indicator detects price imbalances (Fair Value Gaps) on the chart and displays the volume distribution inside each gap using data from a lower timeframe. It is designed for traders who use institutional price action concepts and want to understand where volume was concentrated during the formation of each gap.
What is a Fair Value Gap
A Fair Value Gap (FVG) is a three-candle price imbalance where a candle moves so strongly that it leaves a range untouched between the previous and the following candle. This range is considered an area of interest where price may return. The indicator identifies both bullish and bearish gaps automatically on every closed bar.
- Bullish FVG: the low of the current candle is above the high of the candle two bars back.
- Bearish FVG: the high of the current candle is below the low of the candle two bars back.
A statistical filter based on a rolling 200-bar standard deviation is applied to each detected gap. Only gaps whose size exceeds the configured sigma threshold are drawn on the chart, which reduces noise and keeps only the most relevant imbalances.
Volume Profile inside the Gap
Once a gap is validated, the indicator fetches all sub-bars of the middle candle from a lower timeframe. These bars are bucketed into price bins spanning the gap range. The result is a Volume Profile drawn inside the gap rectangle, showing exactly where trading activity was concentrated during the imbalance formation.
The bin with the highest volume is identified as the Point of Control (POC). A dashed line marks the POC across the gap with a formatted volume label. The total volume of the entire gap is also displayed at the edge of the zone.
Timeframe Selection
By default, the indicator automatically selects the best available lower timeframe, choosing the standard MT5 period closest to one-tenth of the current chart timeframe. This can be overridden manually using the custom timeframe input parameter.
Gap Invalidation
Each active gap is monitored on every tick. If price closes beyond the gap boundary — below the bottom of a bullish gap or above the top of a bearish gap — the gap and all its associated objects are immediately removed from the chart. Up to 10 gaps can be active simultaneously. When the limit is reached, the oldest gap is removed to make room for the new one.
Input Parameters
| Parameter | Default | Description |
|---|---|---|
| InpAutoTF | true | Enables automatic lower timeframe selection (chart TF divided by 10). |
| InpCustomTF | M10 | Manual lower timeframe override. Active only when InpAutoTF is false. |
| InpDisplayVP | true | Shows or hides the volume profile bars inside each gap. |
| InpBins | 12 | Number of price buckets in the volume profile. Recommended range: 4 to 30. |
| InpGapFilter | 0.30 | Minimum gap size in standard deviations. Increase to filter out smaller gaps. |
| InpBullColor | #1DA370 | Color used for bullish gap zones and volume bars. |
| InpBearColor | #BC25D6 | Color used for bearish gap zones and volume bars. |
Usage Notes
- The indicator works on all symbols and all standard MT5 timeframes.
- Tick volume is used for the volume profile, which is always available regardless of broker.
- For brokers providing real volume, the source can be changed inside the code.
- The main gap box uses a 70% transparency blend. On dark chart themes, reduce the transparency or adjust the colors using the input parameters.
- The indicator processes only closed bars on calculation and checks the forming bar on every tick for breach detection. This avoids repainting.
- On the first load, the indicator scans the last 300 bars to avoid processing the full historical data buffer.
Compatibility
MetaTrader 5. All symbols. All standard timeframes from M1 to MN1. No external DLL required.
