0bps

Strategy vault / Trend following

EMA RSI Supertrend Multi Factor Convergence Strategy with Volume Confirmation EMA RSI Supertrend Multi Factor Convergence Strategy with Volume Confirmation

The strategy named "EMA-RSI-Supertrend Multi-Factor Convergence Strategy" combines exponential moving averages (EMA), Relative Strength Index (RSI), Supertrend indicator, and volume confirmation signals to build a…

Author
ianzeng123
Complexity
Starter · 50 lines
Parameters
0
Backtest bar
1d · swing
Tested on
TRX/USD · futures

IMG IMG

Overview

The strategy named "EMA-RSI-Supertrend Multi-Factor Convergence Strategy" combines exponential moving averages (EMA), Relative Strength Index (RSI), Supertrend indicator, and volume confirmation signals to build a multi-factor trading system. It uses the golden cross/death cross of 8-period (short-term) and 21-period (long-term) EMAs as basic signals, supplemented by RSI's midline filter and Supertrend's trend confirmation, finally validated by volume spikes. The strategy adopts full-position entry/exit mode with EMA-based exit conditions, forming a complete trading loop.

Strategy Logic

  1. EMA Crossover System: Uses crosses between 8-period (short) and 21-period (long) EMAs as basic signals. Golden cross (short above long) generates long signals, death cross (short below long) generates short signals.
  2. RSI Filter: Incorporates 14-period RSI as trend strength filter, requiring RSI>50 for long signals (strong zone) and RSI<50 for short signals (weak zone).
  3. Supertrend Confirmation: Employs 10-period, 3.0x ATR Supertrend for trend direction confirmation, requiring Supertrend direction up (1) for longs and down (-1) for shorts.
  4. Volume Validation: Calculates 10-period average volume, considering signals valid only when real-time volume exceeds 1.8x average, avoiding false breakouts.
  5. Exit Mechanism: Closes all positions when price crosses 21-period EMA in reverse direction, achieving dynamic profit-taking/stop-loss.

Advantages

  1. Multi-factor Validation: Four-factor verification (EMA, RSI, Supertrend, volume) significantly improves signal quality.
  2. Trend-following Nature: EMA+Supertrend combination effectively captures trends, avoiding counter-trend trades.
  3. Volume-Price Confirmation: Volume spike requirement filters low-quality breakouts, improving win rate.
  4. Dynamic Exit: EMA-based exit automatically adapts to market fluctuations, protecting profits.
  5. Full Automation: All conditions are quantifiable, eliminating emotional interference.

Risks

  1. Range-bound Risk: Frequent EMA crosses during sideways markets may cause false signals and consecutive losses.
  2. Parameter Sensitivity: EMA periods, RSI thresholds may need adjustment across market regimes.
  3. Volume Lag: Volume confirmation may lag during extreme moves, leading to poor entry points.
  4. Slippage Risk: Full-position trading may face significant execution slippage during high volatility.
    Solutions:
  • Add volatility filter (e.g. ATR) to avoid trading in choppy markets
  • Implement parameter self-adaptation or periodic optimization
  • Set maximum consecutive stop-loss limit
  • Adopt partial position building to reduce market impact

Optimization Directions

  1. Dynamic Parameter Adjustment: Automatically adjust EMA periods based on market volatility (e.g. ATR values), extending periods during high volatility to reduce noise.
  2. Composite Exit Strategy: Combine fixed-ratio take-profit/stop-loss with EMA exit, e.g. setting 1:2 risk-reward ratio.
  3. Machine Learning Optimization: Use historical data to train models for dynamic factor weighting.
  4. Multi-timeframe Confirmation: Incorporate higher timeframe trend confirmation, e.g. daily trend direction.
  5. Capital Management Improvement: Switch to Kelly criterion or fixed fractional position sizing.

Conclusion

This strategy achieves high-quality trend signals through multi-factor synergy, particularly effective in strong trending markets. The quadruple verification mechanism significantly enhances signal reliability but requires adaptability adjustments during range-bound periods. Future enhancements through dynamic parameterization and advanced exit strategies could further improve performance stability. Overall, this is a well-structured, logically clear trend-following system with high practical application value.

Source Pine Script

/*backtest
start: 2024-04-24 00:00:00
end: 2025-04-23 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"TRX_USD"}]
*/

//@version=5

//@WunderTrading
strategy("Nirvana Mode v1.0", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_every_tick=true)

// === INPUTS ===
emaShort = ta.ema(close, 8)
emaLong = ta.ema(close, 21)
rsi = ta.rsi(close, 14)
supertrendFactor = 3.0
supertrendPeriod = 10
[supertrend, direction] = ta.supertrend(supertrendFactor, supertrendPeriod)
volumeAvg = ta.sma(volume, 10)
volumeSpike = volume > volumeAvg * 1.8

// === ENTRY CONDITIONS ===
longCond = ta.crossover(emaShort, emaLong) and rsi > 50 and direction == 1 and volumeSpike
shortCond = ta.crossunder(emaShort, emaLong) and rsi < 50 and direction == -1 and volumeSpike
exitCond = ta.cross(close, emaLong)

// === PLOT & SIGNALS ===
plot(emaShort, color=color.orange)
plot(emaLong, color=color.blue)
plotshape(longCond, title="BUY", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortCond, title="SELL", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
plotshape(exitCond, title="EXIT", location=location.bottom, color=color.gray, style=shape.xcross, size=size.tiny)

// === STRATEGY ORDERS ===
if (longCond)
    strategy.entry("ENTER LONG", strategy.long, comment="ENTER-LONG_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")

if (shortCond)
    strategy.entry("ENTER SHORT", strategy.short, comment="ENTER-SHORT_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")

if (exitCond)
    strategy.close_all(comment="EXIT-ALL_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")

// === ALERT ===
alertcondition(longCond, title="Long Signal", message="ENTER-LONG_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
alertcondition(shortCond, title="Short Signal", message="ENTER-SHORT_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
alertcondition(exitCond, title="Exit Signal", message="EXIT-ALL_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")

Published by ianzeng123 on the FMZ strategy square · last modified 2025-04-24. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.

Build this with AgenKit

A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/EMA-RSI-Supertrend-Multi-Factor-Convergence-Strategy-with-Volume-Confirmation-EMA-RSI-Supertrend-Multi-Factor-Convergence-Strategy-with-Volume-Confirmation.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. Get tests, backtest, risk controls and a paper-trading switch

Understand it first

Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.

Related specs

esc

Try , , or .

↑↓ move↵ open