Type/to search

Multi-Period Moving Average and RSI Momentum Cross Strategy

SMA
1
Follow
1780
Followers

img

Overview

This strategy is a quantitative trading system that combines Simple Moving Averages (SMA) and Relative Strength Index (RSI). It determines trading opportunities by observing the crossover signals of short-term and long-term moving averages while considering RSI overbought and oversold levels. The strategy is written in Pine Script for the TradingView platform, enabling automated trading and graphical display.

Strategy Principles

The core logic is based on the combination of two main technical indicators. First, the system calculates 50-period and 200-period Simple Moving Averages (SMA), using their crossovers as primary trend signals. Second, it incorporates a 14-period RSI indicator with 70 and 30 as overbought and oversold thresholds to filter trading signals. A long position is initiated when the short-term MA crosses above the long-term MA and RSI is below the overbought level. The position is closed when the short-term MA crosses below the long-term MA and RSI is above the oversold level.

Strategy Advantages

  1. High Signal Reliability: By combining trend (SMA) and momentum (RSI) indicators, the strategy effectively reduces false breakout risks.
  2. Strong Parameter Adaptability: The strategy offers multiple adjustable parameters, including MA periods, RSI period, and thresholds, facilitating optimization for different market conditions.
  3. Clear Visual Feedback: Trading signals are clearly displayed on the chart, including different colored moving averages and text-annotated buy/sell markers.
  4. High Automation Level: Supports fully automated trading without manual intervention.

Strategy Risks

  1. Trend Reversal Risk: The lagging nature of moving averages may lead to significant drawdowns during sharp market reversals.
  2. Sideways Market Risk: Frequent MA crossovers during consolidation periods may generate excessive false signals.
  3. Parameter Sensitivity: Different parameter settings can significantly affect strategy performance, requiring thorough historical testing.

Strategy Optimization Directions

  1. Add Trend Strength Filter: Incorporate indicators like ADX to open positions only during clear trends.
  2. Implement Stop Loss: Set stop-loss conditions based on ATR or fixed percentages to control individual trade risk.
  3. Optimize Exit Mechanism: Consider early exits when RSI reaches extreme values or combine with other technical indicators.
  4. Include Volume Confirmation: Integrate volume analysis to enhance signal reliability when generating trade signals.

Summary

This strategy constructs a relatively robust trading system through the dual filtering mechanism of MA crossovers and RSI overbought/oversold levels. It is suitable for trending markets but requires parameter adjustment based on specific market characteristics. The strategy's stability can be further enhanced by adding more filtering conditions and risk control mechanisms. Before live trading, it is recommended to conduct thorough backtesting and optimize parameters according to actual market conditions.

Source
Pine
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-27 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("Chỉ báo Giao dịch Cắt SMA với RSI", overlay=true)

// Định nghĩa các tham số
Strategy parameters
Strategy parameters
Thời gian SMA ngắn (Optional)
Thời gian SMA dài (Optional)
Thời gian RSI (Optional)
Ngưỡng RSI Mua Quá Mức (Optional)
Ngưỡng RSI Bán Quá Mức (Optional)
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)