Right Sided Ricker Moving Average And The Gaussian Derivatives
Feb 17, 2020

The Right Sided Ricker Moving Average indicator provides a low-lag trend-following solution by utilizing a truncated, right-sided Ricker wavelet (also known as the "Mexican Hat" wavelet) as a filter kernel. By isolating the right side of the second-order derivative of a Gaussian function, the tool allows for high-frequency amplification and predictive qualities that minimize lag compared to traditional moving averages.
Usage
The Right Sided Ricker Moving Average (RSRMA) is primarily used to identify trend direction with significantly reduced delay. Because the filter passband is non-monotonic, it can be adjusted to either follow price closely (predictive behavior) or provide a smoother, more lagging output depending on the user's risk tolerance and strategy.
- Trend Following: Use the RSRMA as a dynamic support/resistance line. When the price is above the line, the trend is considered bullish; when below, it is bearish.
- Smoothing vs. Responsiveness: By adjusting the width of the wavelet, users can toggle between an output that mimics a Least Squares Moving Average (LSMA) or one that acts as a standard Gaussian filter.
- Crossover Signals: The script includes built-in alerts for price crossovers, which can serve as entry or exit triggers in a momentum-based strategy.
Details
The indicator is based on the second-order derivative of the Gaussian function. In digital signal processing, higher-order derivatives of Gaussian functions often result in bandpass filters. To transform this into a low-pass filter suitable for price action, the script uses only the "right side" of the Ricker wavelet.
The Ricker wavelet formula is typically defined by its width (sigma). In this implementation, the kernel weights become negative near the boundaries. This characteristic allows the filter to have a "negative group delay," meaning it can anticipate price movements by overshooting or undershooting the current price, effectively neutralizing the lag inherent in most moving averages. A "Percent Width" of approximately 63% provides a result very similar to an LSMA, while lower values increase the predictive (and volatile) nature of the curve.
Settings
- Length: Determines the lookback period used for the calculation. Higher values result in a smoother line with more lag, while lower values make the indicator more responsive to recent price changes.
- Percent Width: Controls the width of the Ricker wavelet as a percentage of the filter length.
- 50% or lower: The filter becomes predictive, often overshooting price.
- 60% - 70%: Provides a balanced fit, similar to a Least Squares Moving Average.
- 100%: Results in a smoother, lagging moving average with no overshoots.
- Source: Specifies the price data used for the calculation (e.g., Close, Open, High, Low).
FAQ
What makes this different from a standard Gaussian Moving Average? Standard Gaussian averages (like the ALMA) use a symmetrical bell curve. The RSRMA uses the second derivative of that curve, allowing for negative weights that reduce lag and enable predictive price hugging.
How do I reduce the "overshooting" of the indicator? To make the indicator smoother and less reactive, increase the "Percent Width" toward 100. This minimizes the influence of the negative weights in the Ricker wavelet.
How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.