The double moving average crossover strategy is a typical trend following strategy using moving averages. It identifies market trend by comparing two moving averages of different periods and generates buy and sell signals when the averages cross over. This simple and practical strategy is suitable for medium to long term position trading.
The strategy mainly utilizes 20-period and 50-period exponential moving averages (EMA) to determine market trend. The logic is:
With this logic, the double EMA strategy is able to follow trend changes dynamically, adjusting position to maximize profit during the trend.
The double moving average crossover strategy has the following advantages:
Simple to implement. Only comparison between two averages is needed, without complex prediction or modeling.
Follows market trend, avoids trading against trend. Utilizes trend tracking ability of moving averages to only enter market when trend is clear.
Automatic stop loss for risk control. Quickly exits losing trades when trend suddenly reverses.
Makeup losing trades, catches upside. Re-enters after stop loss when trend turns bullish again.
Flexible parameters, adaptable. MA periods can be adjusted for different market environments.
High capital utilization. Frequently adjusts position based on trend, keeping capital fully utilized.
There are also some risks with this strategy:
Frequent trading costs. Frequent crosses may lead to excessive transactions.
False signals in range-bound markets. Moving averages may cross over multiple times in choppy markets, causing losses.
Parameter tuning critical. Inadequate stop loss or take profit setting can lead to losses.
Unable to respond to black swan events. Technical indicators have limited ability to capture extreme events.
Misses key support/resistance. Double MA strategy does not identify critical points.
To manage the risks, methods like parameter optimization, adding filters, stop loss, position sizing based on risk assessment can be applied.
The double moving average strategy can be enhanced in several aspects:
Optimize MA parameters for changing markets. Test different short and long term MA combinations to find best fit for current environment.
Add volume filter to avoid false breakouts. Require confirming volume when breakout happens.
Incorporate other indicators for signal validation. Higher reliability when indicators like MACD, Stochastic etc. align with MA crossover.
Dynamically adjust stop loss width. Widen stop loss when volatility increases to avoid premature exit.
Optimize capital management. Determine position size based on risk to limit loss on single trades.
Use different entry logic for trending vs. range-bound markets. Tighten entry rules in choppy markets, waiting for high conviction signals.
The double moving average crossover is a very typical and practical trend following strategy. It has the advantages of easy implementation, following trends, automatic stop loss, makeup losing trades etc., making it very suitable for medium/long-term position trading. We should also pay attention to the risks like over-trading and false signals. These can be improved via parameter tuning, adding filters and proper capital management. For traders looking to ride the trend, this is a simple yet solid strategy.
/*backtest start: 2023-09-01 00:00:00 end: 2023-09-30 23:59:59 period: 2h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version =4 strategy("Moving Average Cross", overlay=true) ema20 = ema(close, 20) ema50 =ema(close, 50) long = ema20 > ema50 short = ema20 < ema50 longcondition = long and long[10] and not long[11] shortcondition = short and short[10] and not short[11] closelong = ema20 < ema50 and not long[11] closeshort = ema20 > ema50 and not short[11] plot(ema20, title="20", color=#00ffaa, linewidth=3) plot(ema50, title="50", color=#FFC1CC, linewidth=2) start = timestamp(2015,6,1,0,0) end = timestamp(2019,6,1,0,0) if true strategy.entry("Long" ,strategy.long, when = longcondition) strategy.entry("Short" ,strategy.short, when = shortcondition) strategy.close("Long", when = closeshort) strategy.close("Short", when = closelong)