Guide
How does the Multi MA Trend Following Strategy Template strategy work ?
This strategy is a versatile trend-following template that lets you test over 20 different types of moving averages and trend lines. Instead of trading on price-crosses, this script bases its signals on the direction of the trend line itself.
The core mechanic is simple:
- You select one trend indicator from a list that includes EMA, SMA, SuperTrend, HMA, and JMA.
- A long position is opened when the value of this indicator increases from the previous bar (i.e., the line starts moving up).
- The position is closed (and a short is opened, if enabled) when the indicator's value decreases.
The plotted line on your chart visually confirms the trend's direction, turning green when it’s rising and red when it’s falling. This allows you to quickly backtest which trend indicator is most effective for a specific asset and timeframe.