Strategy vault / Trend following
Multi Factor Trend Tracking Dynamic Risk Management Stock Trading Strategy
This strategy is a multi-factor trend tracking dynamic risk management stock trading strategy that aims to improve trading signal accuracy and overall performance by comprehensively using multiple technical…

Overview
This strategy is a multi-factor trend tracking dynamic risk management stock trading strategy that aims to improve trading signal accuracy and overall performance by comprehensively using multiple technical indicators. The strategy focuses on trend determination, momentum confirmation, volatility filtering, and risk control, providing investors with a systematic trading approach.
Strategy Principles
The strategy principle is based on comprehensive analysis of six key indicators:
- G-Channel Indicator: Using 20-day and 50-day Exponential Moving Averages (EMA) to determine market trend direction.
- Fantel Variable Moving Average (VMA) Confirmation: Comparing 14-day and 28-day Simple Moving Averages (SMA) to verify trend momentum.
- Coral Trend Confirmation: Determining short-term trend direction through 10-day and 20-day SMA.
- ADX Volatility Confirmation: Evaluating trend strength and market volatility.
- Volume Confirmation: Checking if volume is significantly higher than the 20-day average volume.
- Price Relative to 50-day SMA: Judging price position in the long-term trend.
Strategy Advantages
- Multi-Factor Verification: Significantly reducing false signal probability through six different dimensional indicator cross-validation.
- Dynamic Risk Management: Using Average True Range (ATR) to dynamically adjust stop-loss and take-profit.
- Flexible Entry and Exit Mechanism: Combining trend, momentum, volatility, and volume multiple conditions.
- Risk-Reward Ratio Optimization: Designing a 2:1 risk-reward ratio.
- Low-Frequency Trading: Reducing trade frequency and lowering transaction costs.
Strategy Risks
- Complex Long-Short Judgment: Multi-factor verification may cause signal generation delay.
- Parameter Sensitivity: Fixed parameters may perform poorly in different market environments.
- Volume Limitations: Low volume may increase trading misjudgment risks.
- RSI Extreme Value Limitations: Potentially missing some trading opportunities.
Strategy Optimization Directions
- Adaptive Parameters: Develop dynamic parameter adjustment mechanisms.
- Machine Learning Optimization: Introduce machine learning algorithms to optimize entry and exit timing.
- Multi-Market Adaptability: Customize parameters for different varieties and market environments.
- Incorporate Sentiment Indicators: Introduce market sentiment indicators to improve strategy stability.
Summary
This strategy constructs a relatively robust stock trading system through multi-factor and multi-dimensional trading signal verification. Its core advantage lies in reducing trading risks, but continuous optimization and adaptation to market changes are still necessary.
Source Pine Script
/*backtest
start: 2024-03-31 00:00:00
end: 2025-03-29 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("G-Channel Strategy for Stocks", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === 1️⃣ G-Channel Indicator ===
gChannel = ta.ema(close, 20) > ta.ema(close, 50) ? 1 : 0
// === 2️⃣ Fantel VMA Confirmation ===
fvma = ta.sma(close, 14) > ta.sma(close, 28) ? 1 : 0
// === 3️⃣ Coral Trend Confirmation ===
coral = ta.sma(close, 10) > ta.sma(close, 20) ? 1 : 0
// === 4️⃣ ADX Confirmation (Volatility) ===
adx = ta.ema(ta.rma(ta.atr(14), 14), 14)
adxMa = ta.sma(adx, 14)
adxConfirmed = adx > adxMa ? 1 : 0
// === 5️⃣ Volume Confirmation ===
volConfirm = volume > ta.sma(volume, 20) * 1.3 ? 1 : 0
// === 6️⃣ Price Above 50-Day SMA ===
sma50 = ta.sma(close, 50)
priceAboveSMA = close > sma50 ? 1 : 0
// === ? ENTRY CONDITIONS (LONG & SHORT) ===
longCondition = gChannel and fvma and coral and adxConfirmed and volConfirm and priceAboveSMA
shortCondition = not gChannel and not fvma and not coral and adxConfirmed and volConfirm and close < sma50
// === 7️⃣ ATR Stop-Loss (Lower Than Crypto) ===
atr = ta.atr(14)
stopLoss = close - (atr * 2.0) // Adjusted for stocks
takeProfit = close + (atr * 4.0) // 2:1 Risk/Reward Ratio
// === ? EXECUTE TRADES ===
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit", from_entry="Long", limit=takeProfit, stop=stopLoss)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit", from_entry="Short", limit=close - (atr * 4.0), stop=close + (atr * 2.0))
// === 8️⃣ RSI EXIT (Stocks Exit Earlier) ===
rsi = ta.rsi(close, 14)
if (rsi > 75) // Lower exit threshold for stocks
strategy.close("Long")
if (rsi < 25)
strategy.close("Short")
// === 9️⃣ Volume-Based Exit ===
if (volume < ta.sma(volume, 20) * 0.5)
strategy.close("Long")
strategy.close("Short")Published by ianzeng123 on the FMZ strategy square · last modified 2025-03-31. 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/Multi-Factor-Trend-Tracking-Dynamic-Risk-Management-Stock-Trading-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
- Multi Timeframe Volume and Trend Confluence Trading StrategyPine Script · Trend following · 1d
- Multi Indicator Integrated Trend Following Trading StrategyPine Script · Trend following · 2m
- Dynamic Stop Loss and Take Profit System Based on EMA Crossover with RSI ADX and Volume ConfirmationPine Script · Trend following · 3h
- Multi Indicator Trend Following Strategy with ATR Dynamic Stop Loss Take ProfitPine Script · Trend following · 1d
- Fixed Range Volume Profile And Anchored VWAP Trend Identification Strategy With Dynamic Stop LossPine Script · Trend following · 1h
- Multi Factor Trend Price Action Strategy with Dynamic Risk Management SystemPine Script · Trend following · 2h