Dynamic Moving EMAs Combination Quant Strategy
Overview
This strategy is a dynamic moving average combination strategy that works on multiple timeframes. It usesExponential Moving Averages (EMAs) of different lengths for trend judgment and entry/exit signals. The “MAX” in the strategy name stands for multiple EMAs, and “Dynamic” means the EMA lengths are adjustable.
Strategy Logic
The strategy employs 7 EMAs moving at different speeds, from the fastest to the slowest: 3-period EMA, 15-period EMA, 19-period EMA, 50-period EMA, 100-period EMA, 150-period EMA and 200-period EMA. These 7 EMAs are arranged in a trapezoidal formation. To generate long and short signals, the close price needs to break through these EMAs successively to ensure a strong post-reversal trend entry.
In addition, the strategy also incorporates price breaking recent high and close price crossing historical highs to confirm long signals, and uses breaking recent low and close price crossing historical lows to confirm short signals. This helps avoid false breakouts.
The exit rules require the close price to break the faster EMAs successively towards the slower EMAs, indicating a trend reversal. Alternatively, if the latest bar's low/high breaks more than 4 EMAs, it is also an exit signal for that position.
Advantage Analysis
- Using 7 EMAs of different speeds forming a trapezoid shape can identify trend reversal points more precisely
- Incorporating new high/low and historical highs/lows avoids false breakout signals
- The strict dual exit rules allow timely stop loss
Risk Analysis
- No stop loss mechanism leads to huge loss potential
- The dual exit rules may cause premature exit
- Too many faster EMAs generate more noise and increase trading frequency and commission cost
Solutions:
- Add fixed percentage stop loss and trailing stop loss
- Adjust exit EMA lengths to lower the strictness of dual exit rules
- Increase EMA lengths to reduce trading frequency
Optimization Directions
- Add stop loss mechanisms like fixed percentage stop loss, trailing stop loss etc
- Optimize EMA parameters to find the best combination
- Add other indicators like MACD, ATR, KDJ etc to filter signals
- Combine with range/channel strategies to catch secondary moves in trends
- Consider adding position sizing rules
Conclusion
The strategy has a clear logic of using 7 EMAs of different speeds to determine trends and dual exit rules to detect reversals. But there is no stop loss mechanism leading to huge loss risk, and it may exit prematurely. Improvements can be made in aspects like adding stop loss, parameter tuning, indicator filtering to turn it into a solid trading system.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy(title="Crypto MAX Trend", shorttitle="Crypto MAX", overlay = true )
Length = input(3, minval=1)
Length2 = input(15, minval=1)- 1

