Overview
The Multi-Indicator Trend Following and Momentum Trading System is a comprehensive quantitative trading strategy that combines four technical indicators: Exponential Moving Average (EMA), Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), and Average Directional Index (ADX) to identify market trends and trading signals. The strategy is designed to capture price momentum changes in confirmed strong trends while providing risk management features such as take profit, stop loss, and trailing stop mechanisms to achieve robust trading performance. This strategy is applicable to various timeframes but is particularly suitable for markets with distinct medium to long-term trends.
Strategy Principles
The core principle of this strategy is to confirm trading signals through multiple indicator resonance, strictly following the "trend-following" trading philosophy. Specifically, the strategy operates based on the following key components:
Trend Confirmation: Uses a 100-period EMA (Exponential Moving Average) to determine the current market trend. When the price is above the EMA, it is considered to be in an uptrend; when the price is below the EMA, it is considered to be in a downtrend.
Momentum Signals: Captures price momentum changes through the MACD (12,26,9) indicator. Specifically, a buy signal is generated when the MACD line crosses above the signal line; a sell signal is generated when the MACD line crosses below the signal line.
Market Strength: Evaluates the relative strength of the market using the RSI(14) indicator. An RSI greater than 50 is considered a strong market, suitable for long positions; an RSI less than 50 is considered a weak market, suitable for short positions.
Trend Strength: Employs the ADX(14) indicator to measure trend strength. When the ADX value is greater than the set threshold (default 20), it indicates that the market has a significant trend, making it favorable for entering trades.
Entry Conditions:
- Long Entry: Price > EMA && MACD line crosses above signal line && RSI > 50 && ADX > threshold
- Short Entry: Price < EMA && MACD line crosses below signal line && RSI < 50 && ADX > threshold
Risk Management: The strategy provides two exit mechanisms:
- Fixed Take Profit/Stop Loss: Sets percentage-based take profit (default 3%) and stop loss (default 1.5%)
- Trailing Stop: Optional trailing stop (enabled by default) with a stop percentage of 1.8%
Strategy Advantages
Multi-dimensional Confirmation: By combining four technical indicators with different functions, the strategy confirms trading signals from multiple dimensions including trend, momentum, strength, and trend intensity, significantly reducing the risk of false signals.
High Adaptability: Strategy parameters can be adjusted according to different markets and timeframes, offering high flexibility and wide applicability. By adjusting the period parameters of EMA, RSI, MACD, and ADX, the strategy can adapt to markets with different volatility.
Comprehensive Risk Control: The strategy incorporates take profit, stop loss, and trailing stop mechanisms, effectively controlling the risk of each trade. The trailing stop feature is particularly useful as it protects existing profits while allowing profitable trends to continue.
Combination of Trend and Momentum: The strategy considers both the larger trend (via EMA) and short-term momentum changes (via MACD), enabling it to capture favorable entry points within trends.
Weak Market Filtering: Through the ADX indicator threshold setting, the strategy automatically filters out range-bound markets, only trading in environments with clear trends, thereby improving the win rate.
Flexible Capital Management: The strategy uses a percentage of account equity for position sizing, with a default of 10% per trade, promoting long-term stable performance.
Strategy Risks
Signal Lag: Due to the use of multiple technical indicators, especially the longer-period EMA(100), the strategy may respond slowly at the beginning of trend reversals, potentially missing optimal entry points or maintaining positions after trends have ended.
Over-reliance on Technical Indicators: The strategy operates entirely based on technical indicators without considering fundamental factors and market sentiment, which may lead to poor performance in certain special market environments (such as major news releases or black swan events).
Parameter Sensitivity: The performance of the strategy is highly dependent on parameter settings, with different parameter combinations performing very differently across various market environments, requiring continuous optimization and adjustment.
Drawdown Risk: Despite the stop loss mechanism, in extreme market conditions (such as price gaps or liquidity shortages), actual stop loss levels may significantly deviate from expectations, leading to unexpected losses.
Frequent Trading Risk: In oscillating markets, indicators may frequently generate crossover signals, leading to overtrading and increased transaction costs.
Optimization Risk: When optimizing parameters through historical backtesting, there is a risk of overfitting historical data, potentially causing the strategy to perform poorly in future live trading.
Strategy Optimization Directions
Add Filtering Conditions: Consider adding volume indicators (such as OBV or CMF) to confirm price trends, or volatility indicators (such as ATR) to adjust position size and stop loss range, improving signal quality.
Optimize Entry Timing: Consider waiting for pullbacks in smaller timeframes as entry points after the basic conditions are met, rather than entering immediately when signals appear, to obtain better entry prices.
Dynamic Parameter Adjustment: Parameters can be dynamically adjusted based on market volatility or trend strength. For example, increase the EMA period in high-volatility markets and decrease it in low-volatility markets to make the strategy more adaptive.
Incorporate Fundamental Filters: Consider pausing trading before important economic data or earnings releases to avoid risks brought by abnormal fluctuations due to major information releases.
Improve Capital Management: Dynamically adjust position sizes based on market volatility or signal strength. For example, increase positions when multiple indicators strongly resonate and reduce positions when indicators barely meet the conditions.
Add Time Filters: Add time filtering conditions to avoid volatile periods at market open and close, or only trade during specific trading sessions (such as the overlap between European and American trading hours).
Integrate Machine Learning: Consider using machine learning algorithms to optimize indicator parameters or predict signal reliability, enhancing the adaptability and stability of the strategy.
Summary
The Multi-Indicator Trend Following and Momentum Trading System is a comprehensive trading strategy that combines trend following and momentum trading philosophies. Through the resonance confirmation of four technical indicators—EMA, MACD, RSI, and ADX—it strictly screens trading signals and incorporates comprehensive risk management mechanisms, aiming to achieve robust trading performance in markets with clear trends. The greatest advantage of this strategy lies in its multi-dimensional signal confirmation mechanism and flexible risk control functions, though it also has inherent risks such as signal lag and parameter sensitivity. Through continuous optimization in areas such as adding indicator filters, optimizing entry timing, dynamically adjusting parameters, and improving capital management, the strategy has the potential to maintain good adaptability and profitability across different market environments. For quantitative traders pursuing medium to long-term stable returns, this is a strategy framework worth trying and researching in depth.
Strategy source code
/*backtest
start: 2025-04-23 00:00:00
end: 2025-04-26 00:00:00
period: 2m
basePeriod: 2m
exchanges: [{"eid":"Futures_Binance","currency":"DOGE_USDT"}]
*/
//@version=5
strategy("Multi-Indicator Strategy By Arvind Dodke [EMA+MACD+RSI+ADX]", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === INPUTS ===
emaLength = input.int(100, title="EMA Length")
rsiLength = input.int(14, title="RSI Length")
macdFast = input.int(12, title="MACD Fast Length")
macdSlow = input.int(26, title="MACD Slow Length")
macdSignal = input.int(9, title="MACD Signal Length")
adxLength = input.int(14, title="ADX Length")
adxThreshold = input.float(20.0, title="ADX Threshold")
tpPerc = input.float(3.0, title="Take Profit (%)") / 100
slPerc = input.float(1.5, title="Stop Loss (%)") / 100
useTrailing = input.bool(true, title="Use Trailing Stop?")
trailPerc = input.float(1.8, title="Trailing Stop (%)") / 100
// === INDICATORS ===
ema = ta.ema(close, emaLength)
rsi = ta.rsi(close, rsiLength)
[macdLine, signalLine, _] = ta.macd(close, macdFast, macdSlow, macdSignal)
[plusDI, minusDI, adxValue] = ta.dmi(adxLength, 14)
// === CONDITIONS ===
// Buy Conditions
bullTrend = close > ema
macdBull = ta.crossover(macdLine, signalLine)
rsiBull = rsi > 50
adxStrong = adxValue > adxThreshold
longCondition = bullTrend and macdBull and rsiBull and adxStrong
// Sell Conditions
bearTrend = close < ema
macdBear = ta.crossunder(macdLine, signalLine)
rsiBear = rsi < 50
shortCondition = bearTrend and macdBear and rsiBear and adxStrong
// === STRATEGY EXECUTION ===
if (longCondition)
strategy.entry("Long", strategy.long)
if useTrailing
strategy.exit("Exit Long Trail", from_entry="Long", trail_points=trailPerc * close / syminfo.mintick, trail_offset=trailPerc * close / syminfo.mintick)
else
strategy.exit("Exit Long TP/SL", from_entry="Long", profit=tpPerc * close / syminfo.mintick, loss=slPerc * close / syminfo.mintick)
if (shortCondition)
strategy.entry("Short", strategy.short)
if useTrailing
strategy.exit("Exit Short Trail", from_entry="Short", trail_points=trailPerc * close / syminfo.mintick, trail_offset=trailPerc * close / syminfo.mintick)
else
strategy.exit("Exit Short TP/SL", from_entry="Short", profit=tpPerc * close / syminfo.mintick, loss=slPerc * close / syminfo.mintick)
// === PLOT ===
plot(ema, color=color.orange, title="100 EMA")
Strategy parameters
The original address: Multi-Indicator Trend Following and Momentum Trading System Strategy
Impressive multi-indicator synergy! The way you blend trend confirmation with momentum filters creates a robust yet adaptable system. Backtest results look promising—have you stress-tested it during ranging markets? The clear trade rules and dynamic exits make this particularly practical. Well-optimized without overcomplicating!