Multiple Moving Average Candle System V0
Jul 4, 2015

The Multiple Moving Average Candle System indicator provides a visual overlay that encodes the relationship between two moving averages directly into candlestick bodies to highlight trend expansion, contraction, and potential pivot points.
Usage
The Usage section describes how the script transforms standard price action into a moving average-based visualization. The candle bodies are defined by the distance between two Simple Moving Averages (SMAs), while the wicks represent the actual price High and Low.
- Expansion and Contraction: When the distance between the two moving averages is increasing, the candles appear in a solid, bright color. This indicates increasing momentum. When the averages begin to converge (contract), the candles appear faded, signaling a potential slowdown in the current trend.
- Trend Direction: A bullish candle forms when the shorter-period MA (MA1) is above the longer-period MA (MA2). Conversely, a bearish candle forms when MA1 is below MA2.
- Pivot Detection: The script identifies "Pivot" points where the relationship between the two MAs flips while the gap is expanding. These are often used to identify significant shifts in market structure.
- Visual Aids: Users can enable "Close Price Points" to see the actual closing price of the underlying asset plotted as dots, providing a reference for where price sits relative to the moving average "bodies."
Details
The script, originally developed by RicardoSantos, reimagines traditional trend following by mapping moving average data to OHLC components. In this system:
- Open: Represented by the MA2 (longer period).
- Close: Represented by the MA1 (shorter period).
- High/Low: Represented by the true market High and Low.
The logic calculates the absolute difference between the two moving averages. If this difference is greater than the previous bar's difference, the script flags it as "Expanding." This state-based logic allows traders to distinguish between a healthy trend and a range-bound or exhausting market. The "Trading Vector" feature plots a line connecting these structural pivot points, helping to visualize the historical trajectory of trend shifts.
Settings
General Settings
- Source: Determines the price data used to calculate the moving averages (default is HL2).
- MA1 Length: The period for the first moving average, which acts as the "Close" of the MA candle.
- MA2 Length: The period for the second moving average, which acts as the "Open" of the MA candle.
- Show Close Price Point?: Toggles the visibility of black dots representing the actual closing price.
- Show Trading Vector?: Toggles the display of a vector line that connects price levels where MA pivots were detected.
FAQ
What do the different color intensities signify?
Bright colors indicate that the two moving averages are moving further apart (Expansion), suggesting strong momentum. Faded or desaturated colors indicate the averages are moving closer together (Contraction), suggesting a potential trend reversal or consolidation.
How are the wicks calculated?
Unlike the candle bodies, which are derived from moving averages, the wicks represent the "True" High and Low of the price action for that specific period, ensuring the user maintains a perspective on the actual price range.
How can I get access to 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.