Supertrend MACD Quantitative Strategy
Overview
This strategy combines the potential trend reversal signals from the Supertrend indicator and MACD indicator, together with the overbought/oversold signals from RSI indicator, to form a relatively stable and efficient system for entry and exit signals. The strategy name is “Supertrend MACD Quantitative Strategy”.
Strategy Logic
The core logic of this strategy lies in the combined use of Supertrend indicator and MACD indicator as criteria for entry signals.
On the Supertrend part, the strategy adopts the direction change of Supertrend indicator as the potential reversal signal. When Supertrend direction turns from up to down, a buy signal is generated. When the direction turns from down to up, a sell signal is generated.
On the MACD part, the strategy uses the slope and zero line crossover of MACD indicator on lower timeframe (daily) to identify potential reversal opportunities. When MACD slope absolute value is large (above threshold) and the slope maintains upward trend, a signal is generated. If MACD line crosses zero line, an auxiliary signal is generated. MACD signals are usually more smooth than Supertrend ones.
For entry signals, the strategy requires Supertrend signal and MACD signal to be in the same direction before sending out trading orders.
In addition, for exit signals, the strategy also adopts the overbought/oversold signals from RSI indicator. When RSI goes above 80, a sell signal is generated. When RSI drops below 20, a buy signal is generated. These help determine reversal timing.
Advantage Analysis
The biggest advantage of this strategy is the diversity of indicator signals. Different indicators can complement each other and make the overall signal more steady and reliable.
Supertrend reversal signals can capture relatively strong short-term trends; MACD slope can judge mid-long term trend strength to avoid being misguided by false reversals; RSI can provide the best entry and exit timing in range-bound market by indicating overbought/oversold levels. Stacking signals from multiple indicators can filter out some noisy trades and achieve higher win rate.
In addition, the timeframe design is also reasonable. Supertrend uses hourly timeframe while MACD uses daily timeframe. This ensures both trading frequency and stability in trend judgment.
Risk Analysis
The main risk of this strategy is the high probability of confusing signals between different indicators. For example, Supertrend may give false reversal while MACD signal does not synchronize. This could lead to unnecessary losses.
In addition, RSI for determining exit timing can also be too early or too late, preventing maximum holding period.
Finally, oversized MACD slope threshold may also miss weaker reversal opportunities.
Optimization Directions
This strategy can be further optimized from the following aspects:
-
Introduce stop loss mechanism. Stop loss when loss exceeds certain percentage.
-
Add dynamic threshold for MACD slope judgment. Raise slope threshold when market volatility is high, and lower threshold when market is stable.
-
Add pullback condition for RSI exit judgment. Require a significant callback after RSI exceeds 80 before considering closing position.
-
Testing MACD with volume and see if it improves signal reliability
-
Trying automated parameter tuning to find optimal settings
Conclusion
The “Supertrend MACD Quantitative Strategy” combines signals from multiple indicators to provide entry and exit signals. Its advantages lie in stable signals and relatively high win rate. Further improvements can be achieved through parameter optimization. Risks and optimization directions mainly center around parameter overfitting issues. Overall, this strategy has strong practical value for live trading.
/*backtest
start: 2022-12-19 00:00:00
end: 2023-12-25 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("SuperTrend.MACD Strategy", overlay=false, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, pyramiding=5, process_orders_on_close=true)
- 1

