152 lines
5.5 KiB
Markdown
152 lines
5.5 KiB
Markdown
|
|||
|
|
> Name
|
||
|
|
|
||
|
|
动态趋势动量突破策略-Dynamic-Trend-Momentum-Breakout-Strategy
|
||
|
|
|
||
|
|
> Author
|
||
|
|
|
||
|
|
ianzeng123
|
||
|
|
|
||
|
|
> Strategy Description
|
||
|
|
|
||
|
|

|
||
|
|

|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
[trans]
|
||
|
|
|
||
|
|
#### 概述
|
||
|
|
动态趋势动量突破策略是一种专业的量化交易方法,专门针对高动量股票设计。该策略通过结合指数移动平均线(EMA)、相对强弱指数(RSI)过滤、成交量确认和平均真实波动范围(ATR)为基础的追踪止损,旨在捕捉强劲的市场突破,同时避免虚假信号。
|
||
|
|
|
||
|
|
#### 策略原理
|
||
|
|
该策略的核心原理基于多维度市场信号验证:
|
||
|
|
1. 使用快速和慢速EMA判断整体趋势方向
|
||
|
|
2. 利用RSI评估动量和避免负面背离
|
||
|
|
3. 通过成交量突破确认交易信号
|
||
|
|
4. 应用ATR动态管理止损和追踪止盈
|
||
|
|
|
||
|
|
#### 策略优势
|
||
|
|
1. 高精确度信号过滤:多重条件验证降低错误信号概率
|
||
|
|
2. 动态风险管理:基于ATR的止损机制保护资金
|
||
|
|
3. 趋势跟随:EMA组合确保仅在强势趋势中入场
|
||
|
|
4. 动量捕捉:成交量和RSI过滤确保交易质量
|
||
|
|
|
||
|
|
#### 策略风险
|
||
|
|
1. 市场剧烈波动可能导致止损被触发
|
||
|
|
2. 在震荡市场中可能产生更多无效信号
|
||
|
|
3. 过度依赖技术指标可能错过重要基本面信息
|
||
|
|
|
||
|
|
#### 策略优化方向
|
||
|
|
1. 引入机器学习算法优化参数选择
|
||
|
|
2. 增加跨时间框架验证机制
|
||
|
|
3. 开发更复杂的多因子过滤算法
|
||
|
|
4. 结合情绪指标和基本面数据
|
||
|
|
|
||
|
|
#### 总结
|
||
|
|
动态趋势动量突破策略通过综合多种技术分析工具,构建了一个相对稳健的量化交易方法。其核心在于平衡信号捕捉能力和风险控制,为交易者提供了一个系统化的交易决策框架。
|
||
|
|
|
||
|
|
||
|
||
|
|
|
||
|
|
#### Overview
|
||
|
|
The Dynamic Trend Momentum Breakout Strategy is a professional quantitative trading method specifically designed for high-momentum stocks. By combining Exponential Moving Averages (EMA), Relative Strength Index (RSI) filtering, volume confirmation, and Average True Range (ATR)-based trailing stop-loss, the strategy aims to capture strong market breakouts while avoiding false signals.
|
||
|
|
|
||
|
|
#### Strategy Principles
|
||
|
|
The core principle of the strategy is based on multi-dimensional market signal verification:
|
||
|
|
1. Use fast and slow EMAs to determine overall trend direction
|
||
|
|
2. Utilize RSI to assess momentum and avoid negative divergences
|
||
|
|
3. Confirm trading signals through volume breakouts
|
||
|
|
4. Apply ATR for dynamic stop-loss and trailing profit management
|
||
|
|
|
||
|
|
#### Strategy Advantages
|
||
|
|
1. High-precision signal filtering: Multiple condition verifications reduce error signal probability
|
||
|
|
2. Dynamic risk management: ATR-based stop-loss mechanism protects capital
|
||
|
|
3. Trend following: EMA combination ensures entry only in strong trends
|
||
|
|
4. Momentum capture: Volume and RSI filtering ensure trade quality
|
||
|
|
|
||
|
|
#### Strategy Risks
|
||
|
|
1. Severe market volatility may trigger stop-losses
|
||
|
|
2. More invalid signals may occur in ranging markets
|
||
|
|
3. Over-reliance on technical indicators might miss important fundamental information
|
||
|
|
|
||
|
|
#### Strategy Optimization Directions
|
||
|
|
1. Introduce machine learning algorithms to optimize parameter selection
|
||
|
|
2. Add cross-timeframe verification mechanisms
|
||
|
|
3. Develop more complex multi-factor filtering algorithms
|
||
|
|
4. Incorporate sentiment indicators and fundamental data
|
||
|
|
|
||
|
|
#### Summary
|
||
|
|
The Dynamic Trend Momentum Breakout Strategy builds a relatively robust quantitative trading method by integrating multiple technical analysis tools. Its core lies in balancing signal capture capability and risk control, providing traders with a systematic trading decision framework.[/trans]
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
> Source (PineScript)
|
||
|
|
|
||
|
|
``` pinescript
|
||
|
|
/*backtest
|
||
|
|
start: 2024-03-28 00:00:00
|
||
|
|
end: 2025-03-27 00:00:00
|
||
|
|
period: 1d
|
||
|
|
basePeriod: 1d
|
||
|
|
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
|
||
|
|
*/
|
||
|
|
|
||
|
|
//@version=6
|
||
|
|
strategy("Enhanced First High Break Strategy v3", overlay=true, margin_long=100, margin_short=100)
|
||
|
|
|
||
|
|
// Input Parameters
|
||
|
|
emaFastLength = input.int(9, "Fast EMA Length")
|
||
|
|
emaSlowLength = input.int(20, "Slow EMA Length")
|
||
|
|
rsiLength = input.int(14, "RSI Length")
|
||
|
|
volumeAvgLength = input.int(20, "Volume Average Length")
|
||
|
|
atrLength = input.int(14, "ATR Length")
|
||
|
|
|
||
|
|
// Calculate Indicators
|
||
|
|
emaFast = ta.ema(close, emaFastLength)
|
||
|
|
emaSlow = ta.ema(close, emaSlowLength)
|
||
|
|
rsi = ta.rsi(close, rsiLength)
|
||
|
|
volAvg = ta.sma(volume, volumeAvgLength)
|
||
|
|
atr = ta.atr(atrLength)
|
||
|
|
|
||
|
|
// Pre-calculate lowest values (FIXED)
|
||
|
|
rsiLowCurrent = ta.lowest(rsi, 5)
|
||
|
|
rsiLowPrevious = ta.lowest(rsi[5], 5)
|
||
|
|
lowLowPrevious = ta.lowest(low[5], 5)
|
||
|
|
|
||
|
|
// Trend Conditions
|
||
|
|
bullishTrend = emaFast > emaSlow and emaFast > emaFast[1]
|
||
|
|
bearishDivergence = rsiLowCurrent > rsiLowPrevious and low < lowLowPrevious
|
||
|
|
|
||
|
|
// Entry Conditions
|
||
|
|
validBreakout = close > high[1] and close > emaFast
|
||
|
|
volumeConfirmation = volume > volAvg * 1.5
|
||
|
|
trendConfirmed = close > emaSlow and close[1] > emaSlow
|
||
|
|
rsiConfirmation = rsi > 50 and not bearishDivergence
|
||
|
|
|
||
|
|
// Final Entry Signal
|
||
|
|
entryCondition = validBreakout and volumeConfirmation and trendConfirmed
|
||
|
|
|
||
|
|
// Exit Conditions
|
||
|
|
stopLossPrice = low[1] - (atr * 0.50)
|
||
|
|
trailOffset = atr * 2
|
||
|
|
|
||
|
|
// Strategy Execution
|
||
|
|
if (entryCondition)
|
||
|
|
strategy.entry("Long", strategy.long)
|
||
|
|
strategy.exit("Exit", "Long", stop=stopLossPrice,trail_points=close > emaFast ? trailOffset : na,trail_offset=trailOffset)
|
||
|
|
|
||
|
|
// Plotting
|
||
|
|
plot(emaFast, "Fast EMA", color.new(color.blue, 0))
|
||
|
|
plot(emaSlow, "Slow EMA", color.new(color.orange, 0))
|
||
|
|
plotshape(entryCondition, style=shape.triangleup, color=color.green, location=location.belowbar)
|
||
|
|
```
|
||
|
|
|
||
|
|
> Detail
|
||
|
|
|
||
|
|
https://www.fmz.com/strategy/488546
|
||
|
|
|
||
|
|
> Last Modified
|
||
|
|
|
||
|
|
2025-03-28 17:41:01
|