PROTECTED SOURCE SCRIPT
已更新 FVGs, Env, BB & Knoxville: A Unified Analysis Suite

FVGs, Env, BB & Knoxville: A Unified Analysis Suite
I'm excited to share the Unified Market Analysis Suite, a powerful and comprehensive indicator designed to provide a multi-layered perspective on market dynamics.
Instead of cluttering your chart with separate tools, this script synergizes four key analytical concepts—Fair Value Gaps (FVGs), Volatility Bands (BB & Envelopes), and Momentum Divergence (Knoxville)—into one seamless package. The core philosophy is to help you identify, confirm, and act on high-probability setups by using each component to validate the others. This layered approach provides a more robust signal than any single indicator could alone.
How the Components Work Together: A Strategic Approach
This script is built for a step-by-step analysis, turning abstract data into actionable insights:
Step 1: Spot Potential Reversals with Knoxville Divergence. The process begins when a bullish or bearish Knoxville Divergence signal appears on your chart. This acts as an early warning, alerting you to a potential shift in momentum that is not yet reflected in the price trend.
Step 2: Identify Inefficiency with Fair Value Gaps (FVGs). Following a divergence signal, you then look for a Fair Value Gap to form in the direction of that divergence. For example, after a bullish divergence, a newly formed bullish FVG can serve as a high-probability zone for potential entries.
Step 3: Gauge Volatility with Bollinger Bands. The Bollinger Bands provide critical context. Is the FVG forming during a low-volatility squeeze, suggesting an explosive move might be imminent? Or is it occurring in a high-volatility environment where more caution is needed? An FVG that forms near or outside the bands can signal a particularly potent setup.
Step 4: Confirm with the Macro Trend using Envelopes. Finally, the long-term Envelope channel helps you see the bigger picture. This confirms whether your FVG/divergence setup is aligned with the dominant market trend (a continuation) or against it (a potential reversal), allowing you to manage your trade with greater confidence.
Key Features & Full Customization
Every component is highly customizable to fit your unique trading style.
1. Fair Value Gaps (FVGs) & Consequent Engulfment (CE)
Automatic Detection: Clearly identifies and plots bullish (UP) and bearish (DOWN) FVGs.
Dynamic Visuals: Boxes and CE lines extend until mitigated, with distinct colors for bullish and bearish gaps. You have the option to automatically hide filled boxes for a cleaner chart.
Mitigation Options: Choose whether FVG mitigation is calculated based on wicks or candle bodies.
Clear Labeling: A new feature adds an "FVG" text label inside each box, with adjustable size, color, and positioning.
Advanced Alerts: Receive alerts for FVG formation (confirmed and un-confirmed), price crossing an FVG's threshold (CE or full fill), and IOFED (price entry into an FVG).
2. Knoxville Divergence
Integrated Momentum Analysis: Uses a combination of RSI and Momentum to detect high-quality divergence signals.
Precision Control: Adjust RSI/Momentum lengths, the lookback period for finding divergences, and RSI overbought/oversold levels.
Intuitive Visuals & Alerts: Divergence lines are drawn directly on your chart with customizable colors, styles, and thickness. Alerts trigger the moment a new bearish or bullish divergence is confirmed.
3. Bollinger Bands (BB)
Classic Volatility Analysis: Monitor market volatility and identify potential price extremes.
Multiple MA Types: Choose from SMA, EMA, SMMA (RMA), WMA, or VWMA for the basis of the bands.
Full Customization: Adjust the length, source, and standard deviation multiplier.
4. Envelopes
Trend & Deviation Channel: Quickly assess price deviation from a central moving average.
Flexible Calculation: Can be calculated using either an SMA or EMA as the basis.
Clear Visuals: The channel is filled for easy and immediate interpretation of the broader trend.
Getting Started
This script is an overlay that plots directly on your price chart. After adding it, click the "Settings" cogwheel. You will find clearly organized sections for each of the four components, allowing you to enable, disable, and fine-tune every parameter to create the perfect analytical view for your strategy.
Acknowledgments and Development Process
This indicator is a comprehensive suite, and I want to be transparent about its development. The foundational logic for detecting three-bar Fair Value Gaps was inspired by the excellent open-source script by @twingall.
However, this module was not simply a copy; it was fundamentally re-architected and enhanced to serve as one component within this larger, original system. Here are the specific, significant improvements:
Architectural Refactoring: The original v5 code was entirely rewritten into a modular fvgManager function in Pine Script® v6, allowing it to integrate seamlessly with the other indicators.
New Feature (Dynamic Labels): I designed and implemented a system to add, manage, and customize text labels inside each FVG box—a feature not present in the original.
Original Components: The other three indicators in this suite—Envelopes, Bollinger Bands, and the Knoxville Divergence detector—are my own original code from the ground up.
Synergistic Integration: The primary development effort was focused on integrating these four distinct analytical tools. The FVG code was specifically modified to support advanced conditional visibility, ensuring it could be toggled on and off without conflicting with the other modules.
My goal was to build on a known concept and place it within a broader, synergistic framework. I truly believe the combination of these tools can enhance your analysis. If you find this script valuable, please consider giving it a boost to show your support.
I wish you all the best on your trading journey!
I'm excited to share the Unified Market Analysis Suite, a powerful and comprehensive indicator designed to provide a multi-layered perspective on market dynamics.
Instead of cluttering your chart with separate tools, this script synergizes four key analytical concepts—Fair Value Gaps (FVGs), Volatility Bands (BB & Envelopes), and Momentum Divergence (Knoxville)—into one seamless package. The core philosophy is to help you identify, confirm, and act on high-probability setups by using each component to validate the others. This layered approach provides a more robust signal than any single indicator could alone.
How the Components Work Together: A Strategic Approach
This script is built for a step-by-step analysis, turning abstract data into actionable insights:
Step 1: Spot Potential Reversals with Knoxville Divergence. The process begins when a bullish or bearish Knoxville Divergence signal appears on your chart. This acts as an early warning, alerting you to a potential shift in momentum that is not yet reflected in the price trend.
Step 2: Identify Inefficiency with Fair Value Gaps (FVGs). Following a divergence signal, you then look for a Fair Value Gap to form in the direction of that divergence. For example, after a bullish divergence, a newly formed bullish FVG can serve as a high-probability zone for potential entries.
Step 3: Gauge Volatility with Bollinger Bands. The Bollinger Bands provide critical context. Is the FVG forming during a low-volatility squeeze, suggesting an explosive move might be imminent? Or is it occurring in a high-volatility environment where more caution is needed? An FVG that forms near or outside the bands can signal a particularly potent setup.
Step 4: Confirm with the Macro Trend using Envelopes. Finally, the long-term Envelope channel helps you see the bigger picture. This confirms whether your FVG/divergence setup is aligned with the dominant market trend (a continuation) or against it (a potential reversal), allowing you to manage your trade with greater confidence.
Key Features & Full Customization
Every component is highly customizable to fit your unique trading style.
1. Fair Value Gaps (FVGs) & Consequent Engulfment (CE)
Automatic Detection: Clearly identifies and plots bullish (UP) and bearish (DOWN) FVGs.
Dynamic Visuals: Boxes and CE lines extend until mitigated, with distinct colors for bullish and bearish gaps. You have the option to automatically hide filled boxes for a cleaner chart.
Mitigation Options: Choose whether FVG mitigation is calculated based on wicks or candle bodies.
Clear Labeling: A new feature adds an "FVG" text label inside each box, with adjustable size, color, and positioning.
Advanced Alerts: Receive alerts for FVG formation (confirmed and un-confirmed), price crossing an FVG's threshold (CE or full fill), and IOFED (price entry into an FVG).
2. Knoxville Divergence
Integrated Momentum Analysis: Uses a combination of RSI and Momentum to detect high-quality divergence signals.
Precision Control: Adjust RSI/Momentum lengths, the lookback period for finding divergences, and RSI overbought/oversold levels.
Intuitive Visuals & Alerts: Divergence lines are drawn directly on your chart with customizable colors, styles, and thickness. Alerts trigger the moment a new bearish or bullish divergence is confirmed.
3. Bollinger Bands (BB)
Classic Volatility Analysis: Monitor market volatility and identify potential price extremes.
Multiple MA Types: Choose from SMA, EMA, SMMA (RMA), WMA, or VWMA for the basis of the bands.
Full Customization: Adjust the length, source, and standard deviation multiplier.
4. Envelopes
Trend & Deviation Channel: Quickly assess price deviation from a central moving average.
Flexible Calculation: Can be calculated using either an SMA or EMA as the basis.
Clear Visuals: The channel is filled for easy and immediate interpretation of the broader trend.
Getting Started
This script is an overlay that plots directly on your price chart. After adding it, click the "Settings" cogwheel. You will find clearly organized sections for each of the four components, allowing you to enable, disable, and fine-tune every parameter to create the perfect analytical view for your strategy.
Acknowledgments and Development Process
This indicator is a comprehensive suite, and I want to be transparent about its development. The foundational logic for detecting three-bar Fair Value Gaps was inspired by the excellent open-source script by @twingall.
However, this module was not simply a copy; it was fundamentally re-architected and enhanced to serve as one component within this larger, original system. Here are the specific, significant improvements:
Architectural Refactoring: The original v5 code was entirely rewritten into a modular fvgManager function in Pine Script® v6, allowing it to integrate seamlessly with the other indicators.
New Feature (Dynamic Labels): I designed and implemented a system to add, manage, and customize text labels inside each FVG box—a feature not present in the original.
Original Components: The other three indicators in this suite—Envelopes, Bollinger Bands, and the Knoxville Divergence detector—are my own original code from the ground up.
Synergistic Integration: The primary development effort was focused on integrating these four distinct analytical tools. The FVG code was specifically modified to support advanced conditional visibility, ensuring it could be toggled on and off without conflicting with the other modules.
My goal was to build on a known concept and place it within a broader, synergistic framework. I truly believe the combination of these tools can enhance your analysis. If you find this script valuable, please consider giving it a boost to show your support.
I wish you all the best on your trading journey!
發行說明
Summary of Script UpdatesWe've overhauled the script to add powerful new features while making the alerts clearer and more reliable.
The Core Problem We Solved
Previously, the script's visual settings were linked to the alerts, which could be confusing. We have now separated these so each function is clear and independent.
The Solution: New Features & Clearer Logic
New Feature: Instant FVG Box Deletion
We added a key feature for chart clarity. By checking the Mitigate on FVG Entry box in the settings, you can now have FVG drawings automatically delete themselves the moment price touches them. This keeps your chart clean and focused on fresh FVGs.
Visuals and Alerts are Now Separate
Crucially, the new box-deletion feature is purely visual. It has no effect on how or when your alerts are triggered. How your chart looks is now independent of how your alerts behave.
Redesigned, Intuitive Alerts
We created two distinct alerts that fire only once per event:
Price Touched FVG: An instant alert for when price first enters the gap.
FVG Mitigated at 50% CE / Full Fill: A confirmation alert for when price hits the deeper 50% level or the far side of the box.
The Final Result
You now have a powerful feature to keep your charts clean by instantly removing touched FVGs, combined with a precise, two-stage alert system that operates independently, giving you the best of both worlds.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
rajjathkaneria
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
rajjathkaneria
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。