Moving Average Cross System V0
Feb 5, 2015

The Moving Average Cross System V0 indicator provides a versatile framework for detecting crossovers between two customizable moving averages or price and a moving average to identify potential trend shifts.
Usage
The Usage section describes how the script can be used to identify trend changes and momentum shifts. Users can employ this tool in two primary ways:
- Price Crossover System: By setting "Length 1" to 1, the first moving average effectively tracks the price source. This allows users to generate signals when the price crosses above or below a specific moving average period (Length 2).
- Dual Moving Average System: By assigning different values to both Length 1 and Length 2 (e.g., 50 and 200), the script functions as a classic dual moving average crossover system, identifying "Golden Crosses" and "Death Crosses."
The "Hide MAs" setting allows traders to declutter their workspace by removing the moving average lines while retaining the visual cross markers. This is particularly useful for traders who only need the signal logic without the visual overhead of multiple lines on the chart.
Details
The script executes logic based on the relationship between two calculated series. It offers seven distinct calculation methods to cater to different market conditions:
- SMA (Simple Moving Average): Standard average for basic trend identification.
- EMA (Exponential Moving Average): Gives more weight to recent price action, reducing lag.
- RMA (Relative Moving Average): Used typically in RSI calculations.
- WMA (Weighted Moving Average): Linearly weighted to emphasize recent data.
- VWMA (Volume Weighted Moving Average): Incorporates volume data into the trend calculation.
- SWMA (Symmetrically Weighted Moving Average): Uses a specific weight distribution for smoothing.
- ALMA (Arnaud Legoux Moving Average): Reduces lag while maintaining high smoothness.
The visual output includes a cross marker plotted at the level of the second moving average whenever a crossover or crossunder occurs. These markers are color-coded to indicate direction: green for bullish crossovers and red for bearish crossunders.
Settings
- MA Type: Determines the mathematical formula used for both moving averages (SMA, EMA, RMA, WMA, VWMA, SWMA, or ALMA).
- Hide MAs: A toggle to show or hide the moving average lines on the chart.
- Source: The price input used for calculations (e.g., Close, Open, HL2).
- Length 1: The lookback period for the first (shorter) moving average.
- Length 2: The lookback period for the second (longer) moving average.
FAQ
How do I set up a price-to-MA crossover? To track price crossing a moving average, set "Length 1" to 1 and "Length 2" to your desired moving average period.
Which MA type is best for reducing lag? The EMA and ALMA options are generally preferred by traders looking to reduce the inherent lag found in traditional simple moving averages.
How to access Moving Average Cross System 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.