Multiple Moving Averages Crossover Trading Strategy
Overview
This strategy is based on the crossover of three moving average lines (MA1, MA2, MA3). By setting the type, period, price data source, resolution of the three MAs, as well as enabling trading on their crosses, flexible trading strategy combinations can be obtained.
Principle
The strategy mainly utilizes the crossover and undercross signals between the three moving average lines as trading signals. When the shorter period MA crosses over the longer period MA from bottom to top, it generates a long entry signal; when the shorter period MA crosses under the longer period MA from top to bottom, it generates an exit signal.
Users can freely choose the type (SMA, EMA, etc), period, price data source (close price, highest price, etc) and resolution (minute bars, daily bars, etc) of the three MAs. Also, trading on the crosses between each MA can be enabled or disabled to determine whether to take trading actions on certain crosses.
Currently the strategy only goes long, entering and exiting positions with market orders. By default each trade utilizes 100% of total account equity.
Advantages
- Flexible optimization and combination by freely choosing parameters of MAs, lowering curve fitting risk
- Multiple MA crosses generate more trading opportunities, increasing trading frequency
- Utilizing long, medium and short term MAs balances between trend following and reversal
- Support for different resolutions allows for multi timeframe analysis
- Built-in forecast functionality enables test of parameters fitting effect
Risks
- Large amount of parameter combinations may lead to overfitting
- High trading frequency may increase costs of trading fees and slippage
- Market orders unable to limit entry price
- Conflicting signals may occur with multiple MAs
- Performance difference may exist between backtest and live trading
Optimization Suggestions
- Obtain valid parameter range through walks forward analysis
- Add trading fees and slippage costs in backtest
- Try limit orders instead of market orders
- Add filters to avoid conflicting signals
- Validate strategy robustness in simulated realistic environment
Summary
The strategy comprehensively leverages the smoothing trait of MAs and pattern recognition power of crossover signals. Users can flexibly choose parameters to balance between trend following and reversal identification. Also the risk of overfitting should be controlled by validating strategy robustness under complex market conditions simulated in backtest. In conclusion, this strategy provides an effective example of utilizing multiple MAs for trading.
- 1

