Multi MA Trend Following Strategy Template
Dec 8, 2021

The Multi MA Trend Following Strategy Template indicator is a versatile trend-analysis tool that allows users to toggle between over 20 different moving average and regression types to identify and follow market momentum.
Usage
The Usage section describes how the script can be used to identify market direction and automate backtesting. Users can select a specific trend calculation method from the settings to observe how different filters react to price action.
The indicator provides visual feedback directly on the chart:
- Green Line: Indicates the trend is moving higher than the prior bar, signaling bullish momentum.
- Red Line: Indicates the trend is moving lower than the prior bar, signaling bearish momentum.
Unlike traditional crossover strategies that require two or more averages, this tool focuses on the slope of a single chosen trend line. A Long entry is triggered when the line flips from bearish to bullish, and a Short entry is triggered when it flips from bullish to bearish.
Details
This template serves as a comprehensive framework for trend-following enthusiasts. It incorporates a wide array of calculations ranging from standard averages (SMA, EMA) to more advanced or low-lag variants like Jurik Moving Average (JMA), Kaufman's Adaptive Moving Average (KAMA), and Zero Lag Exponential Moving Average (ZLEMA).
The strategy component is built to help traders identify which specific indicator length or type best fits a particular asset's volatility. It includes logic for date range filtering and toggles for modeling only Long or Short trades, making it a robust starting point for developing more complex trading systems.
Settings
- Trend Selector: Choose from 20+ types including ALMA, DEMA, JMA, SuperTrend, and more.
- Source: Select the price input for the calculations (e.g., Close, Open, HL2).
- MA Length: Set the lookback period for the chosen trend calculation.
- Line Width: Adjust the visual thickness of the plotted trend line.
- Individual MA Settings: A sub-section containing specific parameters for complex averages like ALMA Offset, JMA Phase, or SuperTrend Multipliers.
- Model Long/Short Trades: Toggles to enable or disable specific trade directions for the strategy backtester.
FAQ
How do I change the sensitivity of the trend?
You can adjust the "MA Length" in the settings. A shorter length will make the trend line more responsive to price changes, while a longer length will provide a smoother, more lagged signal.
Can I use this for automated trading?
Yes, the script includes alert conditions that trigger when the trend flips bullish or bearish, which can be connected to third-party execution services.
How can I access Multi MA Trend Following Strategy Template?
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.