This TradingView script calculates and visualizes the Normalized Bollinger Band Distance to analyze the relative spread of Bollinger Bands as a percentage of the moving average. It also determines thresholds based on global statistics to highlight unusual market conditions. Here's a detailed description:
Indicator Overview Purpose: The indicator measures the normalized distance between the upper and lower Bollinger Bands relative to the Simple Moving Average (SMA). It helps identify periods of high or low volatility. Visualization: Displays the normalized distance along with dynamic thresholds based on global statistical calculations (mean and standard deviation). Inputs Length (length): Defines the period for the SMA and Bollinger Bands calculation. Default is 200. Standard Deviations (stdDev): Number of standard deviations for the Bollinger Bands. Default is 2. Calculation Bollinger Bands:
Upper Band: SMA + ( Standard Deviation × stdDev ) SMA+(Standard Deviation×stdDev) Lower Band: SMA − ( Standard Deviation × stdDev ) SMA−(Standard Deviation×stdDev) Normalized Distance:
Normalized Distance = Upper Band − Lower Band SMA Normalized Distance= SMA Upper Band−Lower Band
Global Statistics:
Global Mean ( 𝜇 μ): Average of all normalized distances up to the current bar. Global Standard Deviation ( 𝜎 σ): Standard deviation of all normalized distances up to the current bar. High Threshold: 𝜇 + 1.5 × 𝜎 μ+1.5×σ Low Threshold: 𝜇 − 1.5 × 𝜎 μ−1.5×σ Visualization Normalized Distance Plot: The normalized distance is plotted in blue as a percentage for easy interpretation. Threshold Lines: High Threshold: Red line to signal unusually high volatility. Low Threshold: Green line to signal unusually low volatility. Mean Line: White line indicating the average normalized distance. Zero Line: Horizontal white line for reference. Use Case High Threshold Breach: Indicates an unusual increase in Bollinger Band width relative to the SMA, signaling potential high market volatility. Low Threshold Breach: Indicates an unusual narrowing of Bollinger Band width, suggesting low volatility and potential consolidation. Trend Analysis: Observe how the normalized distance evolves over time to anticipate market conditions.
ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.