Hybrid EMA Momentum Trading System with Trend Persistence Analysis Strategy
This strategy is a hybrid trading system that combines multiple technical indicators, including Exponential Moving Averages (EMA), Relative Strength Index (RSI), and SuperTrend to capture market trends. The strategy…

Overview
This strategy is a hybrid trading system that combines multiple technical indicators, including Exponential Moving Averages (EMA), Relative Strength Index (RSI), and SuperTrend to capture market trends. The strategy uses fixed parameters optimized for 2-hour timeframes, employing a 21/55/200 EMA system for trend identification, combined with RSI(14) momentum filter and SuperTrend(3,14) stop-loss for risk management. It also requires a 1.5x volume surge and ATR volatility confirmation to enhance trading reliability.
Strategy Principles
The core logic is built on a multi-layered technical analysis framework:
- Trend identification system uses triple EMAs (21/55/200 periods) to determine trend direction through crossovers and relative positions
- Momentum confirmation system employs RSI(14) indicator combined with its EMA to filter false breakouts
- Risk control system integrates SuperTrend indicator as dynamic stop-loss and implements a 6-hour trade cooldown period
- Trade trigger conditions require volume exceeding 1.5x of 20-period average volume and ATR above its 48-period EMA
Strategy Advantages
- Parameter Optimization: Uses pre-optimized fixed parameters requiring no frequent adjustments
- Trend Capture: Effectively captures persistent trends through multiple technical indicator coordination
- Risk Control: Built-in trade cooldown mechanism prevents overtrading
- Market Adaptability: Performs well in highly volatile markets
- Trade Confirmation: Multiple condition filters enhance trading signal reliability
Strategy Risks
- Gap Risk: Potential losses from gaps in 24-hour trading markets
- News Impact: Major news events may cause severe price volatility affecting strategy performance
- Stop-Loss Rigidity: Fixed stop-loss settings may lack flexibility
- Market Environment Dependence: May generate frequent false signals in ranging markets
- Slippage Risk: Potential significant slippage in markets with poor liquidity
Strategy Optimization Directions
- Dynamic Parameter Adjustment: Implement automatic SuperTrend parameter adjustment based on market volatility
- Market Environment Recognition: Add market state identification module for different parameter settings in various market conditions
- Stop-Loss Optimization: Introduce dynamic stop-loss mechanism adapting to market volatility
- Volume Analysis Enhancement: Incorporate more sophisticated volume analysis models to improve signal accuracy
- Risk Management Optimization: Implement dynamic position sizing system based on market conditions
Summary
This strategy constructs a relatively complete trading system through the combination of multiple technical indicators. Its strength lies in effective trend capture and enhanced trading reliability through multiple condition filters. While inherent risks exist, the strategy's overall performance can be improved through optimization and refinement. It is particularly suitable for volatile markets but requires attention to market environment changes and risk control.
Source Pine Script
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-16 08:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Hybrid Trend Momentum Strategy by Biege ver. 1.0", overlay=true)
// ---- SUPERTREND FIX ----
supertrendWrapper(factor, atrPeriod) =>
[stLine, stDir] = ta.supertrend(factor, atrPeriod)
[stLine, stDir]
// ---- GLOBAL EMA CALCULATIONS ----
fastEMA = ta.ema(close, 21)
slowEMA = ta.ema(close, 55)
trendEMA = ta.ema(close, 200)
atrVal = ta.atr(14)
atrEMA = ta.ema(atrVal, 48)
rsiVal = ta.rsi(close, 14)
rsiEMA = ta.ema(rsiVal, 14)
volumeEMA = ta.ema(volume, 20)
[supertrendLine, supertrendDir] = supertrendWrapper(3, 14)
// ---- TRADE THROTTLING SYSTEM ----
var int lastTradeTime = na
tradeCooldown = input.int(360, "Cooldown (minutes)", minval=60, step=15) * 60 * 1000
// ---- ENHANCED ENTRY CONDITIONS ----
entryCondition =
ta.crossover(fastEMA, slowEMA) and
rsiVal > rsiEMA + 10 and
close > supertrendLine and
close > trendEMA and
volume > volumeEMA * 1.5 and
atrVal > atrEMA and
(na(lastTradeTime) or time - lastTradeTime >= tradeCooldown)
// ---- ULTRA-OPTIMIZED EXIT CONDITIONS ----
exitCondition =
ta.crossunder(fastEMA, slowEMA) or // Main EMA cross remains
ta.crossunder(rsiVal, rsiEMA - 15) or // Increased from -10 to -15 (harder trigger)
ta.crossunder(close, supertrendLine * 0.98) // Changed from 1.01 to 0.98 (2% buffer below)
// ---- TRADE EXECUTION ----
if entryCondition
strategy.entry("Buy", strategy.long)
lastTradeTime := time
if exitCondition
strategy.close("Buy")
// ---- VISUALS ----
plot(fastEMA, "Fast EMA", color.new(#2962FF, 0), 2)
plot(slowEMA, "Slow EMA", color.new(#FF6D00, 0), 2)
plot(trendEMA, "Trend EMA", color.new(#AA00FF, 0), 2)
plot(supertrendLine, "SuperTrend", color.new(#00C853, 0), 2)
plotshape(entryCondition, "Buy", shape.triangleup,
location.belowbar, color.new(#00E676, 0), size=size.small)
plotshape(exitCondition, "Sell", shape.triangledown,
location.abovebar, color.new(#FF1744, 0), size=size.small)Published by ChaoZhang on the FMZ strategy square · last modified 2025-02-18. 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/Hybrid-EMA-Momentum-Trading-System-with-Trend-Persistence-Analysis-Strategy.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
- Advanced Multi Indicator Trend Following and Momentum Quantitative Trading StrategyPine Script · Momentum · 1h
- Multi Indicator Trend Momentum Crossover Quantitative StrategyPine Script · Momentum · 1d
- Multi Technical Indicator Trend Following Strategy with RSI Momentum FilterPine Script · Momentum · 1h
- Multi Indicator Comprehensive Analysis Quantitative Trading Strategy Trend Momentum and Volatility Collaborative Prediction ModelPine Script · Momentum · 3m
- Oscillator Candles Momentum Trading StrategyPine Script · Momentum · 1h
- Momentum Oscillator Trend Tracking StrategyPine Script · Momentum · 1d