Wavetrend Moving Average (WTMA)
Sep 20, 2022

The Wavetrend Moving Average (WTMA) indicator transforms the classic Wavetrend oscillator into an overlay moving average to provide trend direction and potential reversal signals directly on the price action.
Usage
The Usage section describes how the script can be used to identify trend shifts and momentum. Because the Wavetrend oscillator is morphed into a moving average (WTMA), it can be utilized similarly to a standard EMA or SMA but with the sensitivity of a momentum-based calculation.
- Trend Identification: When the WTMA is colored green, it indicates bullish momentum based on the underlying Wavetrend calculation. Conversely, a red WTMA indicates bearish momentum.
- Crossover Signals: The indicator plots "L" (Long) and "S" (Short) labels when the underlying oscillator crosses the zero line, which corresponds to the WTMA changing color and shifting its position relative to price.
- Bar Coloring: Users can enable bar coloring to visually sync the price candles with the current momentum state of the WTMA.
Details
The Wavetrend Moving Average is based on the Trading Channel Index (TCI). The TCI measures the ratio between the average daily price and a smoothed version of that price. To convert this oscillator into a moving average that sits on the price chart, the following steps are performed:
- Oscillator Calculation: The script calculates the standard Wavetrend (TCI) using two smoothing lengths.
- Normalization: The resulting oscillator is normalized using a Z-score calculation over a user-defined period.
- Range Projection: The script identifies the Highest High and Lowest Low over a specific "HiLo Period."
- Mapping: The normalized Wavetrend value is mapped onto the price range discovered in the previous step.
- Midpoint Calculation: The upper and lower boundaries derived from the mapping are averaged to create the final WTMA plot.
The script also utilizes "Loxx's Expanded Source Types," allowing users to select from a wide variety of price inputs, including Heikin-Ashi variants and adaptive calculations like KAMA or AMA.
Settings
- Source Settings: Allows the selection of the price input, ranging from standard Close to advanced Heikin-Ashi Better (HAB) sources.
- Channel Length: Sets the primary EMA smoothing length for the Wavetrend calculation.
- Average Length: Sets the secondary smoothing length for the Wavetrend oscillator.
- Normalization Period: Determines the lookback period used for the Z-score normalization of the oscillator.
- HiLo Period: Defines the lookback range used to project the oscillator values back onto the price chart.
- UI Options: Toggles for bar coloring and the visibility of Long/Short signal shapes.
- Moving Average Inputs: Specific parameters for adaptive source types, such as Kaufman's Adaptive MA (KAMA) and the Adaptive Moving Average (AMA).
FAQ
How do I interpret the color changes on the WTMA? The color changes represent the zero-line cross of the internal Wavetrend oscillator. Green indicates positive momentum (bullish), while red indicates negative momentum (bearish).
What is the "Normalization Period" used for? It defines how many bars the script looks back to normalize the Wavetrend values, ensuring the resulting moving average stays proportional to recent price volatility.
How can I access the Wavetrend Moving Average (WTMA)? 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.