Inputs: Users can adjust the Bollinger Bands' parameters, including the length of the moving average, type of moving average (SMA, EMA, SMMA, WMA, VWMA), source data (e.g., close price), and standard deviation multiplier. An offset is also available for shifting the Bollinger Bands horizontally.
Calculation: The basis line is calculated using the selected moving average type and length. The upper and lower bands are computed by adding and subtracting the standard deviation (multiplied by the user-defined multiplier) from the basis line.
Plot: The basis, upper, and lower Bollinger Bands are plotted on the chart with customizable colors and offsets.
A series of EMAs with different lengths (3, 5, 8, 10, 12, 15, 30, 33, 40, 45, 50, 60, and 90) are computed using the close price.
Visualization: Short-term EMAs (3–15) are plotted in cyan. Medium-term EMAs (30–45) are plotted in red. Long-term EMAs (50–90) are plotted in varying shades of blue, indicating different levels of transparency for better distinction.
Application and Use This indicator is designed for traders who want to:
Identify trends: Use the GMMA to gauge short-term, medium-term, and long-term price movements. Converging or diverging EMAs can indicate trend strength or potential reversals.
Spot volatility: Bollinger Bands help detect periods of high or low volatility. When prices touch or cross the upper or lower band, they may signal overbought or oversold conditions.
Combine both tools for confirmation: Bollinger Bands can validate trend directions identified by the GMMA. For example, if short-term EMAs in the GMMA start crossing above long-term EMAs and the price stays above the Bollinger Bands' basis, it could signal a bullish trend.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.