
この戦略は、ボラティリティ レート ストップ (VStop) インジケーターと指数移動平均 (EMA) に基づいたトレンド追跡取引システムです。この戦略は、スタン・ワインスタインの取引哲学を組み合わせて、ストップロス レベルを動的に調整することで資金管理を最適化し、EMA を使用してトレンドの方向を確認します。この組み合わせにより、投資家やスイングトレーダーは、リスクを効果的に管理しながらトレンドを捉えることができる取引フレームワークを利用できるようになります。
この戦略のコアロジックは、2 つの主要なテクニカル指標に基づいています。
ボラティリティ ストップ (VStop): 市場のボラティリティに応じてストップ ポジションを適応的に調整する、ATR (平均真の範囲) に基づく動的ストップ インジケーター。価格が上昇傾向にある場合、ストップロスラインは価格の上昇に伴って上方に移動します。トレンドが反転すると、ストップロスラインの方向が切り替わり、再計算されます。
指数移動平均 (EMA): トレンド確認ツールとして機能し、誤ったシグナルを除去するのに役立ちます。ポジションを開くことを検討する前に、価格が EMA を上回っている必要があります。これにより、取引の方向が主要なトレンドと一致していることが保証されます。
取引シグナル生成ロジックは次のとおりです。
この戦略は、ボラティリティ ストップ ロスと移動平均システムを組み合わせることで、完全なトレンド追従型取引フレームワークを構築します。この戦略の主な利点は、適応性とリスク管理能力にありますが、市場環境が戦略のパフォーマンスに与える影響にも注意を払う必要があります。継続的な最適化と改善を通じて、この戦略はさまざまな市場環境において安定したパフォーマンスを維持することが期待されます。トレーダーは、実際の取引で使用する前に、パラメータ設定を十分にテストし、自身のリスク許容度に基づいて戦略を調整することをお勧めします。
/*backtest
start: 2024-12-17 00:00:00
end: 2025-01-16 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy("VStop + EMA Strategy", overlay=true)
// VStop Parameters
length = input.int(20, "VStop Length", minval=2)
multiplier = input.float(2.0, "VStop Multiplier", minval=0.25, step=0.25)
// EMA Parameters
emaLength = input.int(30, "EMA Length", minval=1)
// VStop Calculation
volStop(src, atrlen, atrfactor) =>
if not na(src)
var max = src
var min = src
var uptrend = true
var float stop = na
atrM = nz(ta.atr(atrlen) * atrfactor, ta.tr)
max := math.max(max, src)
min := math.min(min, src)
stop := nz(uptrend ? math.max(stop, max - atrM) : math.min(stop, min + atrM), src)
uptrend := src - stop >= 0.0
if uptrend != uptrend[1] and not barstate.isfirst
max := src
min := src
stop := uptrend ? max - atrM : min + atrM
[stop, uptrend]
// Calculate VStop
[vStop, isUptrend] = volStop(close, length, multiplier)
// Plot VStop
plot(vStop, "Volatility Stop", style=plot.style_cross, color=isUptrend ? color.teal : color.red)
// Calculate 30 EMA
emaValue = ta.ema(close, emaLength)
plot(emaValue, "EMA", color=color.blue)
// Entry and Exit Conditions
longCondition = isUptrend and close > emaValue
exitCondition = close <= emaValue
// Strategy Execution
if longCondition and not strategy.opentrades
strategy.entry("Long", strategy.long)
if exitCondition and strategy.opentrades
strategy.close("Long")
// Display Strategy Info
bgcolor(isUptrend ? color.new(color.teal, 90) : color.new(color.red, 90), title="Trend Background")