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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.