OPEN-SOURCE SCRIPT

0️⃣ Bollinger Bands with GMMA

Bollinger Bands Implementation

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.

GMMA (Guppy Multiple Moving Averages) Implementation

Exponential Moving Averages (EMAs):

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.
Bands and Channels

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明