Multi Moving Average Crossing (by Coinrule)
Feb 25, 2021

The Multi Moving Average Crossing indicator identifies trend reversals and optimal exit points by utilizing three distinct moving average periods to balance signal reliability with exit efficiency.
Usage
The Usage section describes how the script can be used to identify entry and exit points based on the interaction of three simple moving averages (SMA). This strategy is designed to capture significant uptrends while minimizing the lag typically associated with standard moving average crossovers.
- Bullish Entry: A long position is triggered when the Middle Moving Average (default 50) crosses above the Long Moving Average (default 100). This crossover serves as a filter to ensure the trade is initiated during a confirmed long-term trend shift.
- Bearish Exit: The trade is closed when the Short Moving Average (default 9) crosses below the Middle Moving Average (default 50). Using a faster moving average for the exit allows the strategy to secure profits earlier than waiting for a slow-period crossover, effectively reducing the impact of trend exhaustion.
The script is most effective on higher timeframes, such as the 1-hour, 4-hour, or 6-hour charts, where price action is less prone to market noise.
Details
The Multi Moving Average Crossing strategy addresses the inherent trade-off between signal speed and reliability. While short-period moving averages react quickly to price changes, they often produce false signals. Conversely, long-period moving averages are more reliable but suffer from significant lag, often entering or exiting a trade after the majority of the move has occurred.
By employing three averages, the script separates the entry logic from the exit logic. The entry relies on the "Golden Cross" principle between the 50 and 100 SMAs to confirm momentum. The exit utilizes the 9 SMA to detect the first sign of weakening momentum relative to the 50 SMA, aiming to preserve capital and capture a larger portion of the realized move. Empirical testing suggests this asymmetric approach can outperform standard two-period crossover systems in terms of average and median returns across various asset classes.
Settings
Date Range
- From Month/Day/Year: Sets the starting date for the backtesting period.
- Thru Month/Day/Year: Sets the ending date for the backtesting period.
- Show Date Range: Toggles the visibility of the date range constraints.
Moving Average Periods
- MAlong: Defines the period for the Long Moving Average (default 100), used for primary trend identification.
- MAmid: Defines the period for the Middle Moving Average (default 50), used for both entry confirmation and as a baseline for the exit.
- MAfast: Defines the period for the Short Moving Average (default 9), used to trigger early exits when price momentum fades.
FAQ
How do I adjust the sensitivity of the exit signals? You can decrease the "MAfast" period to make exits more sensitive to price fluctuations, or increase it to stay in trades longer during volatile trends.
Can this strategy be used for shorting? The current implementation is designed as a long-only strategy that opens a position on a bullish crossover and closes it on a bearish crossunder.
How can I access the Multi Moving Average Crossing 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.