This strategy is a comprehensive trading system that combines moving averages, momentum, and oscillator indicators. The strategy utilizes the Moving Average Convergence Divergence (MACD), Exponential Moving Average (EMA), and Relative Strength Index (RSI) to execute trades when market trends are clear and momentum is sufficient. The strategy primarily focuses on upward trends, using multiple technical indicators for cross-validation to ensure signal reliability.
The strategy employs a triple-filtering mechanism to determine trading opportunities:
Position closing conditions are flexible, triggered by any of the following:
The strategy constructs a relatively robust trading system through the comprehensive use of multiple technical indicators. Its core advantage lies in the multiple confirmation mechanisms, effectively reducing the impact of false signals. Through reasonable optimization and improved risk control, the strategy has the potential to maintain stable performance across different market conditions. While there are risks of lagging and missed opportunities, it is overall a practical trading strategy with real-world value.
/*backtest start: 2019-12-23 08:00:00 end: 2024-12-10 08:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Simplified SOL/USDT Strategy", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100) // Input parameters fast_length = input(12, "MACD Fast Length") slow_length = input(26, "MACD Slow Length") signal_length = input(9, "MACD Signal Length") ema_length = input(200, "EMA Length") rsi_length = input(14, "RSI Length") // Calculate indicators [macd, signal, hist] = ta.macd(close, fast_length, slow_length, signal_length) ema200 = ta.ema(close, ema_length) rsi = ta.rsi(close, rsi_length) // Entry conditions long_entry = close > ema200 and macd > signal and rsi > 50 and rsi < 70 // Exit conditions long_exit = macd < signal or close < ema200 or rsi > 70 // Strategy execution if (long_entry) strategy.entry("Long", strategy.long) if (long_exit) strategy.close("Long") // Plot indicators plot(ema200, color=color.blue, title="EMA 200") plot(macd, color=color.blue, title="MACD") plot(signal, color=color.orange, title="Signal") // Plot entry and exit points plotshape(long_entry, title="Long Entry", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small) plotshape(long_exit, title="Long Exit", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)