OPEN-SOURCE SCRIPT
stelaraX - Fair Value Gap

stelaraX – Fair Value Gap
stelaraX – Fair Value Gap is a technical analysis indicator designed to detect, visualize, and manage Fair Value Gaps (FVGs) using a strict three-candle imbalance model. The script identifies bullish and bearish gaps, draws them as zones on the chart, and tracks their mitigation status over time.
For advanced AI-based chart analysis and automated structure interpretation, visit stelarax.com
Core logic
The indicator detects Fair Value Gaps using a three-bar condition:
* bullish FVG when the current low is above the high from two bars ago
* bearish FVG when the current high is below the low from two bars ago
Detected gaps are filtered using minimum size requirements:
* minimum size in ticks
* minimum size as a percentage of price
Each FVG stores its top and bottom boundaries, its midpoint level (Consequent Encroachment), the creation bar, and its current state.
Consequent Encroachment and mitigation
The script can optionally plot the Consequent Encroachment (CE) level, defined as the midpoint of the gap.
Mitigation tracking is supported and can be defined as:
* Touch
* 50 percent retracement to the CE level
* Full fill of the gap
When mitigation occurs, the FVG can:
* remain visible in a mitigated state
* be deleted automatically
* stop extending and close at the mitigation bar
Mitigation styling uses a dedicated color scheme to clearly separate active and mitigated gaps.
Visualization
FVGs are drawn directly on the chart as colored zones:
* bullish FVGs are displayed in green tones
* bearish FVGs are displayed in red tones
Optional features include:
* CE level line with configurable line style
* FVG labels
* automatic extension of active gaps
* configurable maximum age and maximum number of displayed gaps
All colors and display settings are fully customizable.
Dashboard
An optional on-chart dashboard provides a real-time overview of:
* total bullish and bearish FVGs
* mitigated bullish and bearish FVGs
* active (unmitigated) FVGs
* mitigation percentages
Dashboard position and text size are configurable.
Alerts
Alert conditions are available for:
* newly detected bullish FVGs
* newly detected bearish FVGs
Additional real-time alerts can be triggered when an FVG is mitigated.
Use case
This indicator is intended for:
* imbalance and fair value gap mapping
* identifying potential reaction zones and retracement areas
* tracking gap mitigation behavior over time
* multi-timeframe confluence analysis
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
stelaraX – Fair Value Gap is a technical analysis indicator designed to detect, visualize, and manage Fair Value Gaps (FVGs) using a strict three-candle imbalance model. The script identifies bullish and bearish gaps, draws them as zones on the chart, and tracks their mitigation status over time.
For advanced AI-based chart analysis and automated structure interpretation, visit stelarax.com
Core logic
The indicator detects Fair Value Gaps using a three-bar condition:
* bullish FVG when the current low is above the high from two bars ago
* bearish FVG when the current high is below the low from two bars ago
Detected gaps are filtered using minimum size requirements:
* minimum size in ticks
* minimum size as a percentage of price
Each FVG stores its top and bottom boundaries, its midpoint level (Consequent Encroachment), the creation bar, and its current state.
Consequent Encroachment and mitigation
The script can optionally plot the Consequent Encroachment (CE) level, defined as the midpoint of the gap.
Mitigation tracking is supported and can be defined as:
* Touch
* 50 percent retracement to the CE level
* Full fill of the gap
When mitigation occurs, the FVG can:
* remain visible in a mitigated state
* be deleted automatically
* stop extending and close at the mitigation bar
Mitigation styling uses a dedicated color scheme to clearly separate active and mitigated gaps.
Visualization
FVGs are drawn directly on the chart as colored zones:
* bullish FVGs are displayed in green tones
* bearish FVGs are displayed in red tones
Optional features include:
* CE level line with configurable line style
* FVG labels
* automatic extension of active gaps
* configurable maximum age and maximum number of displayed gaps
All colors and display settings are fully customizable.
Dashboard
An optional on-chart dashboard provides a real-time overview of:
* total bullish and bearish FVGs
* mitigated bullish and bearish FVGs
* active (unmitigated) FVGs
* mitigation percentages
Dashboard position and text size are configurable.
Alerts
Alert conditions are available for:
* newly detected bullish FVGs
* newly detected bearish FVGs
Additional real-time alerts can be triggered when an FVG is mitigated.
Use case
This indicator is intended for:
* imbalance and fair value gap mapping
* identifying potential reaction zones and retracement areas
* tracking gap mitigation behavior over time
* multi-timeframe confluence analysis
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.