Moving Average Trend Expansion Analysis V0
Feb 3, 2015

The Moving Average Trend Expansion Analysis V0 tool calculates the percentage difference between price action and multiple moving averages to visualize trend expansion and identify shifts in market momentum.
Usage
The Usage of this indicator focuses on identifying the relationship between short-term price movements and long-term trend baselines. It consists of two primary visual components:
- Long-Term Trend (Smooth 2): Represented by columns and a baseline, this component tracks the broader market direction. When the columns are above zero, the long-term trend is considered bullish; below zero, it is bearish.
- Short-Term Momentum (Smooth 1): Displayed as a histogram, this faster oscillator tracks more immediate fluctuations within the primary trend.
Traders can use the color-coded output to gauge trend strength:
- Bright Green/Red: Indicates price is moving strongly in the direction of the trend (expansion).
- Dark Green/Red: Indicates price is moving against the current trend or momentum is slowing (contraction).
The indicator also includes optional visual signals that mark when these oscillators cross the zero threshold, often signifying a potential trend reversal or significant momentum shift.
Details
The script executes by calculating the percentage distance between three distinct Simple Moving Averages (SMA). The core logic uses the formula ((MA_short - MA_long) / Source) * 100 to normalize the distance, allowing the indicator to provide a consistent scale regardless of the asset's price level.
By comparing a fast moving average (often representing price itself when length is 1) against intermediate and long-term averages, the script measures "expansion"—the degree to which price is overextending from its mean. The resulting values are then smoothed using additional SMA calculations to reduce noise and provide a clearer visual representation of market cycles.
Settings
- Length 1: The period for the fastest moving average, representing the primary tracking point (default is 1 for price).
- Length 2: The period for the intermediate moving average used for the short-term oscillator.
- Length 3: The period for the long-term moving average used for the trend oscillator.
- Smooth Length 1: The smoothing period applied to the short-term histogram.
- Smooth Length 2: The smoothing period applied to the long-term columns.
- Source: The price data input used for all moving average calculations.
- Hide Signals: Toggles the visibility of the cross markers on the oscillator.
FAQ
What do the zero-line crossings signify? A zero-line crossing indicates that the shorter moving average has crossed the longer moving average, suggesting a change in the directional bias of the trend or momentum.
How do I interpret the bright vs. dark colors? Bright colors represent momentum accelerating in the direction of the trend (e.g., rising above zero or falling below zero). Dark colors represent momentum retreating toward the zero line.
How can I access Moving Average Trend Expansion Analysis V0? 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.