Dual EMA Momentum Trend Trading Strategy with Full Body Candle Signal System
This strategy is a trend following system that combines technical analysis and price action. The core of the strategy utilizes 9-period and 15-period Exponential Moving Averages (EMA) as trend direction indicators…

Overview
This strategy is a trend following system that combines technical analysis and price action. The core of the strategy utilizes 9-period and 15-period Exponential Moving Averages (EMA) as trend direction indicators, while incorporating full body candles (Marubozu) as momentum confirmation signals to form a complete trading decision system. Through analysis of moving average crossovers and price action, the strategy can capture major market trend changes and execute trades at appropriate times.
Strategy Principles
The strategy employs a dual filtering mechanism to confirm trading signals. First, it uses 9-period and 15-period EMAs to determine market trend direction. Second, it identifies full body candle patterns as momentum confirmation signals. A buy signal is generated when a full body bullish candle closes above both EMAs, while a sell signal is triggered when a full body bearish candle closes below both EMAs. A full body candle is defined as having its body occupy at least 75% of the total candle length, indicating strong unidirectional market movement during that period.
Strategy Advantages
- High Signal Reliability: Combining EMAs and full body candles significantly improves trading signal reliability
- Accurate Trend Capture: The dual EMA system effectively identifies market trends, avoiding frequent trading in ranging markets
- Clear Execution Standards: Strategy entry and exit conditions are well-defined, facilitating quantitative implementation
- Comprehensive Risk Control: Built-in reverse signal closing mechanism effectively controls position risk
- Simple and Intuitive Operation: Strategy logic is simple to understand and execute, suitable for various types of traders
Strategy Risks
- Lag Risk: Moving averages inherently have lag, potentially causing delayed entry timing
- False Breakout Risk: Markets may exhibit false breakouts leading to incorrect signals
- Range-bound Market Risk: Frequent false signals may occur during market consolidation periods
- Gap Risk: Large price gaps may render stop losses ineffective
- Parameter Optimization Risk: Optimal parameters may vary across different market environments
Optimization Directions
- Introduce Volatility Filter: Add ATR indicator to filter trading signals in low volatility environments
- Optimize Moving Average Periods: Adjust EMA periods according to different market characteristics
- Add Trend Strength Confirmation: Incorporate ADX or similar trend strength indicators as auxiliary judgment tools
- Improve Stop Loss Mechanism: Add trailing stop loss functionality for better profit protection
- Add Market Environment Filter: Introduce market state judgment mechanism to automatically reduce trading frequency in ranging markets
Summary
This strategy builds a robust trend following trading system by combining moving average systems with full body candle signals. The strategy design fully considers both trend confirmation and momentum confirmation dimensions, offering good reliability and practicality. Through appropriate optimization and risk control measures, the strategy can maintain stable performance across different market environments. Overall, this is a logically rigorous and highly practical trading strategy system.
Source Pine Script
/*backtest
start: 2024-10-25 00:00:00
end: 2024-11-24 00:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("9 & 15 EMA with Full Body Candle Strategy", overlay=true)
// Input parameters for EMAs
ema9Length = input.int(9, title="9-period EMA")
ema15Length = input.int(15, title="15-period EMA")
// Calculate the 9-period and 15-period EMAs
ema9 = ta.ema(close, ema9Length)
ema15 = ta.ema(close, ema15Length)
// Define full body (marubozu) candle conditions
fullBodyBullishCandle = (close > open) and (close - open >= (high - low) * 0.75)
fullBodyBearishCandle = (close < open) and (open - close >= (high - low) * 0.75)
// Buy condition: Full body candle closes above both EMAs
buySignal = fullBodyBullishCandle and close > ema9 and close > ema15
// Sell condition: Full body candle closes below both EMAs
sellSignal = fullBodyBearishCandle and close < ema9 and close < ema15
// Plot the EMAs on the chart
plot(ema9, color=color.blue, linewidth=2, title="9-period EMA")
plot(ema15, color=color.orange, linewidth=2, title="15-period EMA")
// Plot buy and sell signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", size=size.small)
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", size=size.small)
// Execute buy and sell strategy
if (buySignal)
strategy.entry("Buy", strategy.long)
if (sellSignal)
strategy.entry("Sell", strategy.short)
// Close buy position on sell signal
if (sellSignal)
strategy.close("Buy")
// Close sell position on buy signal
if (buySignal)
strategy.close("Sell")
Published by ChaoZhang on the FMZ strategy square · last modified 2024-11-25. 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/Dual-EMA-Momentum-Trend-Trading-Strategy-with-Full-Body-Candle-Signal-System.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
- Dual EMA Crossover with RSI Momentum Enhanced Trading StrategyPine Script · Momentum · 1d
- Advanced EMA Crossover Momentum Trend Capture StrategyPine Script · Momentum · 2h
- Momentum Trading Strategy Based on Multi factor ModelPine Script · Momentum · 1d
- Multi Indicator Trend Momentum Trading Strategy Based on SuperTrendPine Script · Momentum · 2d
- RSI Momentum and ADX Trend Strength Based Capital Management SystemPine Script · Momentum · 2d