RSI Trend Momentum Trading Strategy with Dual MA and Volume Confirmation
This strategy is a trend-following system that combines RSI oversold signals, long-term moving averages, and volume confirmation. It aims to capture long positions during oversold conditions within established…

Overview
This strategy is a trend-following system that combines RSI oversold signals, long-term moving averages, and volume confirmation. It aims to capture long positions during oversold conditions within established uptrends, validated by volume expansion. The strategy utilizes a 10-period RSI, dual SMAs of 250 and 500 periods, and a 20-period volume moving average as core indicators.
Strategy Principles
The core logic is based on three key conditions working in harmony:
- RSI oversold signal (RSI<=30): Captures market rebound opportunities
- Dual MA bullish alignment (SMA250>SMA500): Confirms long-term uptrend
- Volume confirmation (Current volume>20-period volume MA*2.5): Validates price movements
A long position is initiated when all three conditions are met simultaneously. The exit signal is triggered by a death cross (shorter MA crossing below longer MA). Additionally, a 5% stop-loss is implemented for risk management.
Strategy Advantages
- Multiple confirmation reduces false signals: Integration of RSI, MAs, and volume provides robust signal filtering
- Trend-following characteristics: Long-term MAs prevent counter-trend trading
- Comprehensive risk control: Fixed stop-loss effectively manages per-trade risk
- High adaptability: Parameters can be adjusted for different market conditions
- Strict trade selection: Multiple conditions ensure optimal entry timing
Strategy Risks
- Lag risk: Long-period MAs introduce significant delay in trend identification
- Over-filtering risk: Strict multiple conditions might miss valid trading opportunities
- Ranging market risk: False signals may occur frequently in sideways markets
- Stop-loss configuration risk: Fixed percentage stops may not suit all market conditions
- Parameter optimization risk: Over-optimization may lead to poor live trading performance
Optimization Directions
- Dynamic stop-loss: Consider implementing ATR or volatility-based dynamic stops
- Trend strength quantification: Incorporate ADX or similar indicators for better trend assessment
- Position sizing optimization: Adjust position size based on signal strength and market volatility
- Exit mechanism enhancement: Add profit targets and trailing stops for flexible exits
- Time filtering: Implement trading time filters to avoid inefficient periods
Summary
This is a well-designed trend-following strategy with rigorous logic, effectively balancing returns and risks through multiple technical indicators. Its core strengths lie in comprehensive signal confirmation and risk management systems, though it faces challenges in over-filtering and latency. Through the suggested optimization directions, the strategy shows potential for improved performance in practical applications.
Source Pine Script
/*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"}]
*/
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © wielkieef
//@version=5
strategy(title=' Rsi Long-Term Strategy [15min]', overlay=true, pyramiding=1, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_order_fills=false, slippage=0, commission_type=strategy.commission.percent, commission_value=0.03)
// Rsi
rsi_lenght = input.int(10, title='RSI lenght', minval=0)
rsi_up = ta.rma(math.max(ta.change(close), 0), rsi_lenght)
rsi_down = ta.rma(-math.min(ta.change(close), 0), rsi_lenght)
rsi_value = rsi_down == 0 ? 100 : rsi_up == 0 ? 0 : 100 - 100 / (1 + rsi_up / rsi_down)
rsi_overs = rsi_value <= 30
rsi_overb = rsi_value >= 70
// Volume
vol_sma_length = input.int(20, title='Volume lenght ', minval=1)
Volume_condt = volume > ta.sma(volume, vol_sma_length) * 2.5
//SMA1
lengthSMA1 = input(250, title="Lenght SMA 1")
SMA1 = ta.sma(close, lengthSMA1)
//plot(SMA1, color=color.rgb(245, 108, 3), linewidth=1, title="SMA250")
//SMA2
lengthSMA2 = input(500, title="Lenght SMA 2")
SMA2 = ta.sma(close, lengthSMA2)
//plot(SMA2, color=#9803f5, linewidth=1, title="SMA500")
//Entry Logic
Long_cond = (rsi_overs and SMA1 > SMA2 and Volume_condt )
if Long_cond
strategy.entry('Long', strategy.long)
//Close Logic
Long_close = ta.crossunder(SMA1,SMA2)
if Long_close
strategy.close("Long")
//Bar colors
Bar_color = Volume_condt ? #fc9802 : SMA1 > SMA2 ? color.rgb(84, 252, 0) : SMA1 < SMA2 ? color.maroon : color.gray
barcolor(color=Bar_color)
// Rsi value Plotshapes
plotshape(rsi_value < 30 and SMA1 > SMA2 and Volume_condt, title='Buy', color=color.new(color.green, 0), style=shape.circle, location=location.belowbar, size=size.tiny, textcolor=color.new(color.black, 0))
plotshape(rsi_value > 70 and SMA1 < SMA2 and Volume_condt, title='Sell', color=color.new(color.red, 0), style=shape.circle, location=location.abovebar, size=size.tiny, textcolor=color.new(color.black, 0))
plotshape(ta.crossunder(SMA1,SMA2) , title='DEATH CROSS', color=#000000, style=shape.xcross, location=location.abovebar, size=size.small, textcolor=color.new(color.black, 0))
//Stop-Loss// this code is from author RafaelZioni, modified by wielkieef
pera(pcnt) =>
strategy.position_size != 0 ? math.round(pcnt / 100 * strategy.position_avg_price / syminfo.mintick) : float(na)
stoploss = input.float(title=' stop loss', defval=5.0, minval=0.5)
los = pera(stoploss)
strategy.exit('SL', loss=los)
// by wielkieefPublished by ChaoZhang on the FMZ strategy square · last modified 2024-11-28. 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.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/RSI-Trend-Momentum-Trading-Strategy-with-Dual-MA-and-Volume-Confirmation.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- 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
- Multi Period Moving Average and RSI Momentum Cross StrategyPine Script · Momentum · 1d
- Multi Indicator Adaptive Momentum Crossover Trading SystemPine Script · Momentum · 1h
- Multi Indicator Dynamic Stop Loss Momentum Trend Trading StrategyPine Script · Momentum · 1h
- Multi Indicator Trend Momentum ATR Target Trading StrategyPine Script · Momentum · 1d
- KST EMA Momentum Trend Following StrategyPine Script · Momentum · 1d
- Multi EMA Trend Momentum Trading Strategy with Risk Management SystemPine Script · Momentum · 1h