
この戦略は,複数の移動平均,動向指標,およびダイナミック・リスク・コントロールを組み合わせたトレンド・トラッキング・システムである.戦略は,価格の傾向,市場の動き,および波動率を分析することによって取引機会を識別し,厳格なポジション管理とストップダウンの仕組みを適用しながらリスクを制御する.その核心ロジックは,長期短期指数移動平均の交差と相対的に強い弱指数 (RSI) の組み合わせを使用し,平均リアル波幅 (ATR) を介してストップダウンの位置を動的に調整する.
戦略は,取引シグナルを確認するために,多層の検証メカニズムを使用します.
この戦略は,複数の技術指標の総合的な使用によって,完全なトレンド追跡取引システムを構築している.戦略は,リスク管理において優れたパフォーマンスを発揮し,ダイナミックなストップ損失とポジション管理により,撤収を効果的に制御している.戦略は,拡張性が強く,複数の最適化方向を保留している.トレーダーは,実際の使用時に,特定の市場の特徴と自身のリスクの好みに応じてパラメータを調整することを推奨している.
This strategy is a trend following system that combines multiple moving averages, momentum indicators, and dynamic risk control. It identifies trading opportunities by analyzing price trends, market momentum, and volatility while implementing strict position management and stop-loss mechanisms. The core logic revolves around the crossover of long and short-term exponential moving averages (EMA) combined with the Relative Strength Index (RSI), using Average True Range (ATR) for dynamic stop-loss positioning.
The strategy employs a multi-layer verification mechanism to confirm trading signals:
This strategy constructs a complete trend following trading system through the comprehensive use of multiple technical indicators. It shows excellent performance in risk control through dynamic stop-loss and position management. The strategy demonstrates strong extensibility with multiple optimization directions reserved. Traders are advised to adjust parameters according to specific market characteristics and their own risk preferences when implementing in live trading.
/*backtest
start: 2024-02-22 00:00:00
end: 2025-02-19 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"DOGE_USDT"}]
*/
//@version=6
strategy("High-Return Trend Strategy (Final)", overlay=true)
// === Inputs ===
longEmaLength = input(200, title="Long EMA Length")
shortEmaLength = input(50, title="Short EMA Length")
rsiLength = input(14, title="RSI Length")
rsiBuyLevel = input(50, title="RSI Buy Level")
atrLength = input(14, title="ATR Length")
atrMultiplier = input(2.5, title="ATR Multiplier") // Adjusted for lower drawdown
riskPerTrade = input.float(1.0, title="Risk % per Trade", minval=0.1, maxval=5.0, step=0.1) // Risk % of equity
// === Indicators ===
longEma = ta.ema(close, longEmaLength)
shortEma = ta.ema(close, shortEmaLength)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(atrLength)
[plusDI, minusDI, adx] = ta.dmi(14, 14) // DI and ADX smoothing set to 14
// === Position Sizing ===
// Calculate position size based on risk per trade
riskAmount = strategy.equity * (riskPerTrade / 100) // Risk % of account equity
positionSize = riskAmount / (atr * atrMultiplier) // ATR-based stop-loss distance
// === Entry Conditions ===
trendConfirmed = ta.barssince(shortEma <= longEma) > 10 // Persistent trend above long EMA
longCondition = shortEma > longEma and rsi > rsiBuyLevel and adx > 20 and trendConfirmed
// === Exit Conditions ===
longStopLoss = close - atr * atrMultiplier // Dynamic stop-loss
strategy.exit("Trailing Stop", from_entry="Buy", trail_points=atr * 1.5, trail_offset=atr * 1.5) // Trailing stop
// === Strategy Logic ===
if (longCondition)
strategy.entry("Buy", strategy.long, qty=positionSize)
// === Alerts ===
alertcondition(longCondition, title="Buy Signal", message="Buy Signal Triggered!")
alertcondition(strategy.closedtrades > 0, title="Trade Closed", message="Trade Closed!")
// === Debugging and Visualization ===
plot(longEma, color=color.red, title="Long EMA (200)")
plot(shortEma, color=color.blue, title="Short EMA (50)")
plot(rsi, color=color.purple, title="RSI")
hline(rsiBuyLevel, "RSI Buy Level", color=color.green)
plot(adx, color=color.orange, title="ADX")
hline(20, "ADX Threshold", color=color.red)