PROTECTED SOURCE SCRIPT
FVG

# Fair Value Gap (FVG) Indicator
## Overview
The Fair Value Gap (FVG) indicator is a technical analysis tool designed to identify potential areas of price imbalance in the market. These imbalances, known as "fair value gaps," represent discontinuities in price movement where supply and demand were significantly imbalanced, potentially creating zones that price may return to in the future. This indicator was developed by Michele Amori for TradingView and operates as an overlay on price charts.
## Core Concept
Fair Value Gaps occur when price makes a significant move in one direction, leaving behind an area where no trading occurred. Specifically:
- **Bullish FVG**: Forms when the low of the current candle is higher than the high of the candle two positions back, creating an upward gap in price movement.
- **Bearish FVG**: Forms when the high of the current candle is lower than the low of the candle two positions back, creating a downward gap in price movement.
These gaps represent potential "fair value" areas that price may revisit to establish equilibrium between buyers and sellers.
## Visual Representation
The indicator displays FVGs in the following manner:
1. **Bullish FVGs**:
- Represented by semi-transparent green boxes
- Extend from the high of the candle two positions back to the low of the current candle
- Include a dashed green center line representing the middle point of the gap
2. **Bearish FVGs**:
- Represented by semi-transparent red boxes
- Extend from the low of the candle two positions back to the high of the current candle
- Include a dashed red center line representing the middle point of the gap
All FVG boxes and their center lines are extended to the right of the chart, making them visible until they are filled or invalidated.
## Invalidation Logic
The indicator automatically removes FVGs when they are considered filled or invalidated:
- **Bullish FVGs**: Removed when the closing price falls below the bottom of the FVG box, indicating that the upward gap has been filled.
- **Bearish FVGs**: Removed when the closing price rises above the top of the FVG box, indicating that the downward gap has been filled.
This removal only occurs after a candle is confirmed (fully formed), ensuring that premature invalidation doesn't occur during candle formation.
## Technical Implementation
The indicator uses arrays to store and manage the FVG boxes and their center lines. Key features of the implementation include:
- Creation of new FVGs only after candle confirmation
- Dynamic addition and removal of visual elements
- Transparent coloring (75% transparency) for better chart visibility
- Dashed center lines with less transparency (25%) to highlight the middle point of gaps
## Overview
The Fair Value Gap (FVG) indicator is a technical analysis tool designed to identify potential areas of price imbalance in the market. These imbalances, known as "fair value gaps," represent discontinuities in price movement where supply and demand were significantly imbalanced, potentially creating zones that price may return to in the future. This indicator was developed by Michele Amori for TradingView and operates as an overlay on price charts.
## Core Concept
Fair Value Gaps occur when price makes a significant move in one direction, leaving behind an area where no trading occurred. Specifically:
- **Bullish FVG**: Forms when the low of the current candle is higher than the high of the candle two positions back, creating an upward gap in price movement.
- **Bearish FVG**: Forms when the high of the current candle is lower than the low of the candle two positions back, creating a downward gap in price movement.
These gaps represent potential "fair value" areas that price may revisit to establish equilibrium between buyers and sellers.
## Visual Representation
The indicator displays FVGs in the following manner:
1. **Bullish FVGs**:
- Represented by semi-transparent green boxes
- Extend from the high of the candle two positions back to the low of the current candle
- Include a dashed green center line representing the middle point of the gap
2. **Bearish FVGs**:
- Represented by semi-transparent red boxes
- Extend from the low of the candle two positions back to the high of the current candle
- Include a dashed red center line representing the middle point of the gap
All FVG boxes and their center lines are extended to the right of the chart, making them visible until they are filled or invalidated.
## Invalidation Logic
The indicator automatically removes FVGs when they are considered filled or invalidated:
- **Bullish FVGs**: Removed when the closing price falls below the bottom of the FVG box, indicating that the upward gap has been filled.
- **Bearish FVGs**: Removed when the closing price rises above the top of the FVG box, indicating that the downward gap has been filled.
This removal only occurs after a candle is confirmed (fully formed), ensuring that premature invalidation doesn't occur during candle formation.
## Technical Implementation
The indicator uses arrays to store and manage the FVG boxes and their center lines. Key features of the implementation include:
- Creation of new FVGs only after candle confirmation
- Dynamic addition and removal of visual elements
- Transparent coloring (75% transparency) for better chart visibility
- Dashed center lines with less transparency (25%) to highlight the middle point of gaps
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
I'm an intraday futures trader, without necessarily having any particular talent. I show my trades in real time explaining the reasons behind them, the technological tools I use, the trading models I've developed, and my risk management best practices.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
I'm an intraday futures trader, without necessarily having any particular talent. I show my trades in real time explaining the reasons behind them, the technological tools I use, the trading models I've developed, and my risk management best practices.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.