Dual Moving Average Crossover Persistent Uptrend Strategy
Overview
This is a trading strategy that utilizes moving average crossover patterns along with persistent uptrend to enter trades. When the fast MA crosses above the slow MA, a golden crossover signal is generated. If the uptrend persists after the crossover, a long position can be opened. When the price rallies to the stop loss or take profit levels, the position can be closed for stop loss or take profit.
Strategy Logic
The strategy is primarily based on moving average crossover for entry signals. Specifically, a fast MA (MA1) and slow MA (MA2) are defined. When MA1 crosses above MA2, it's a signal to go long.
To avoid false signals from short-term crossovers, an angle threshold is added, so that a buy signal is only triggered when the MA2 angle is above a set threshold. This filters out some non-trending short-term rallies.
The strategy also sets a stop loss and take profit. The stop loss avoids losses in case of sudden market reversal, while take profit locks in profits. They are set as a percentage range from the entry price.
When price rallies to take profit point, the strategy will close long for profit taking. Also, if the rally is strong, the strategy will open a short position for mean reversion.
Advantage Analysis
This is a simple and intuitive trend following strategy. The advantages are:
- MA combo filters out market noise and locks in trend direction
- Angle threshold avoids being misled by short-term oscillations
- Two-way trading allows profiting from range-bound markets
- Stop loss and take profit controls risk
Risk Analysis
There are some risks to note:
- MAs have lag and may miss turning points
- Stop loss is not guaranteed, can be gapped in fast markets
- Double-edge trading doubles risk, timing of short entry is key
- Poor parameter tuning like MA periods can affect results
Improvement Areas
Some ways to further optimize the strategy:
- Add trend filters like MACD, Bollinger to improve accuracy
- Use machine learning to dynamically optimize MA periods
- Optimize stop loss and take profit settings e.g. trailing stops
- Add position sizing to limit losses
- Gauge trend strength with ADX to size mean reversion position
Conclusion
Overall this is a simple and practical trend following strategy. It has pros but also risks. Further refinements like parameter tuning, optimal indicators, stop loss settings etc. can improve it. But no strategy eliminates systemic risk fully. Risk management is key for prudent trading.
/*backtest
start: 2023-11-05 00:00:00
end: 2023-11-12 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//written by [email protected]
//@version=5
strategy(title="MJ-Dual Moving Average",initial_capital=10000,overlay=false)
- 1

