TradingView
profitprotrading
3. Jul. 2023 14:13

ALMA Smoothed Gaussian Moving Average 

Bitcoin all time history indexINDEX

Beschreibung

This indicator is an altered version of the Gaussian Moving Average (GMA) (Credit to author: © LeafAlgo tradingview.com/v/th7NZUPM/). The GMA applies weights to the prices, giving more importance to the values closer to the current period and gradually diminishing the significance of older prices. The ALMA Smoothed Gaussian Moving Average (ASGMA) applies an ALMA smoothing to its price data to minimize lag and provide a more accurate representation of the underlying trend by dynamically adapting to changing market conditions. The Arnaud Legoux Moving Average (ALMA) is a specialized smoothing technique that adjusts the weights of the moving average based on market volatility. Its calculation uses Wavelet Transform techniques which enables this type of smoothing to capture both high-frequency and low-frequency components of a signal or data. The rationale for this mashup between ALMA and Gaussian filtering is to smooth the moving average line over the smoothed price data and produce stronger trend signals.

ASGMA serves as a trend-following indicator, identifying both bullish and bearish trends. It provides buy and sell signals indicated by "B" and "S" labels plotted alongside the price data. Additionally, the ASGMA's Exponential Moving Average (EMA) line alternates between green and red, indicating bullish and bearish momentum, respectively.

The ASGMA also incorporates two popular momentum indicators, the Relative Strength Index (RSI) and the Chande Momentum Oscillator (CMO). The inclusion of these indicators aims to enhance trend identification and reversal signals. For a strong buy signal, all three indicators (RSI, CMO, and ASGMA) must indicate bullish conditions, resulting in a vertical green line. Conversely, a vertical red line is plotted when all indicators indicate bearish conditions, representing a strong sell signal.

The ASGMA, with its unique combination of smoothing techniques and indicator amalgamation, provides traders and investors with powerful analytical tools. It can be applied in trend-following strategies using the regular buy and sell signals generated by labels and the EMA line. Alternatively, the vertical lines offer stronger buy and sell signals. These features aid in identifying potential entry and exit points, thereby enhancing trading decisions and market analysis. However, it is important to remember that the future performance of any trading strategy is fundamentally unknowable, and past results do not guarantee future performance.

Versionshinweise

Added Alerts

Versionshinweise

Slight fix
Kommentare
Candyfl1p
Is there an indicator-based strategy planned in the future?
profitprotrading
@Candyfl1p, Thank you! Yes, this is in the plans for the near future :)
twoppert
It appears this thing repaints
Candyfl1p
its repaint Buy\Sell labels?
profitprotrading
@Candyfl1p, No it does not repaint.
Candyfl1p
@profitprotrading, Thanks for good indicator! I think there little error in line: value = ta.highest(avpchange, i + 1) + ta.lowest(avpchange, i + 1). This code should resolve this:

// Calculate Gaussian Moving Average
gma = 0.0
sumOfWeights = 0.0
sigma = adaptive ? ta.stdev(close, volatilityPeriod) : input.float(1.0, minval=0.1, title="Standard Deviation", group="Gaussian Adaptive Moving Average")

// Calculate highest and lowest values
highestValue = ta.highest(avpchange, length)
lowestValue = ta.lowest(avpchange, length)

// Calculate Gaussian Moving Average with highest and lowest values
for i = 0 to length - 1
weight = math.exp(-math.pow(((i - (length - 1)) / (2 * sigma)), 2) / 2)
value = highestValue + lowestValue
gma := gma + (value * weight)
sumOfWeights := sumOfWeights + weight

gma := (gma / sumOfWeights) / 2
gma := ta.ema(gma, 7)
gmaColor = avpchange >= gma ? color.rgb(0, 161, 5) : color.rgb(215, 0, 0)
repsolal
@profitprotrading, sure it repaints............. signals display 2 bars before current bar. Change offset from 0.85 to 0 and it still repaints and signals are worse
repsolal
lws8611
@repsolal, I've been through the same phenomenon as you. If not, it's a very good indicator, which is a shame.
hushedDirector76037
@Candyfl1p,
It’s with delay
Mehr