ストラテジーをフォローする渦振動器のトレンド

作者: リン・ハーンチャオチャン, 日付: 2023-12-07 16:48:45
タグ:

img

概要

ヴォルテックスオシレータートレンドフォロー戦略は,ヴォルテックス指標に基づくトレンドトラッキング戦略である. ヴォルテックス指標を構成するために複数のタイムフレームの移動平均を使用し,潜在的な価格傾向を特定し,低リスクトレンドトラッキングオペレーションを達成するために補助判断として短い期間の移動平均と組み合わせます.

戦略原則

この戦略のコア指標は,渦輪指標である.渦輪指標は,複数のタイムフレームの短期,中期,長期移動平均から構成される.特に,戦略は6日,27日,72日,234日の移動平均を使用する.短期移動平均は,価格の最新の傾向を反映し,長期移動平均は,長期的な傾向を反映する.指標のコア論理は,短期移動平均が長期移動平均を超えると,上向きの勢力が強くなって買い時であることを示唆する.短期移動平均が長期移動平均を下回ると,上向きの勢力が弱くなって売るべきであることを示す.

ヴォルテックス指標の重要な利点は,トレンドを正確に判断し,市場のノイズを効果的にフィルタリングすることである.しかし,その反応は,ターニングポイントをタイムリーに捕捉するのに十分な敏感度ではない.したがって,戦略は,より敏感な6日移動平均を組み込み,補助判断指標を構築する.ヴォルテックス指標と補助指標の両方がゼロ線を超えると購入し,両方の指標がゼロ線を下回ると売却する.これは,ヴォルテックス指標がトレンドの方向性と強度を決定し,補助指標が特定のエントリーと出口点を決定する多確認論理を形成する.これは,取引の敏感性を向上しながら偽信号をフィルタリングする.

利点分析

この戦略の最大の利点は,判断の正確性と取引の敏感性である.ヴォルテックスインジケーターと補助指標の組み合わせは,相互に干渉を回避しながら,トレンド判断と特定のエントリー/エグジットポイントの決定の有機的な統一を達成する.マルチ確認メカニズムは,市場のノイズを効果的にフィルタリングし,間違った取引を回避することができる.同時に,補助指標の追加は,戦略の取引の敏感性を保証する.

単一指標戦略と比較して,この戦略の利点は,市場の変化を特定し,それに反応する強力な能力を達成するために複数の指標を組み合わせることです.変化しない主要なトレンドの下で,戦略は安定した利益を達成することができます.主要なトレンドが変化すると,戦略は損失を減らすためにも迅速に対応できます.

リスク分析

この戦略の主なリスクは,指標の不適切なパラメータ設定と極端なイベントの影響から生じる.移動平均のパラメータは,感度とノイズ干渉耐性をバランスする必要があります.不適切なパラメータ設定は,異常な戦略行動につながります.さらに,主要なイベントは,指標を無効にする極端な価格変動を引き起こし,間違った取引を引き起こす可能性があります.

これらのリスクを軽減するために,パラメータを最適化し,指標のパフォーマンスを安定させるためにバックテストする必要があります.また,主要なイベントからの市場影響に注意を払い,異常な変動期間の誤りを避けるために必要に応じて戦略を一時停止してください.価格の傾向が低下するにつれて,徐々にポジションを削減することは,効果的な資本保存措置でもあります.

オプティマイゼーションの方向性

戦略は以下の側面で最適化できます.

  1. 移動平均パラメータを最適化して,インジケーターのノイズ抵抗と動作感度を向上させる.スムーズで敏感なインジケーターを選択するために,長さの異なるパラメータ組み合わせを試してみてください.

  2. ストップ・ロスのメカニズムを追加します.価格が不利な方向に主要なサポートレベルを突破したときのストップ・ロスのポイントを設定し,さらなる損失を回避します.

  3. 戦略の安定性を高めるために他の指標判断を組み込む.例えば,取引量が増えるとのみシグナルを取ること.

  4. 異なる市場段階に基づいて異なるパラメータセットを使用します.例えば,牛市場ではより積極的なパラメータ,熊市場ではより安定した設定です.

結論

ヴォルテックスオシレータートレンドフォロー戦略は,トレンド判断と実行を,価格トレンド方向/強さを決定するヴォルテックスインジケーターと,特定のエントリー/エグジットタイミングを特定する敏感な短期移動平均を成功裏に組み合わせます.パラメータを最適化し,ストップ損失を追加し,状態メカニズムを導入することで,戦略はリスク抵抗能力をさらに強化し,優れたバックテストメトリックとライブパフォーマンスを達成する可能性があります.


/*backtest
start: 2022-11-30 00:00:00
end: 2023-12-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//swap strategy line for study line to enable backtesting
strategy(title="Vortex Ocillator" )
//study(title = "Vortex Oscillator", precision = 6)

// Component Code Start
// Example usage:
// if testPeriod()
//   strategy.entry("LE", strategy.long)
testStartYear = input(2017, "Backtest Start Year")
testStartMonth = input(01, "Backtest Start Month")
testStartDay = input(2, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,0,0)

testStopYear = input(2048, "Backtest Stop Year")
testStopMonth = input(7, "Backtest Stop Month")
testStopDay = input(30, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,0,0)

// A switch to control background coloring of the test period
testPeriodBackground = input(title="Color Background?", type=bool, defval=true)
testPeriodBackgroundColor = testPeriodBackground and (time >= testPeriodStart) and (time <= testPeriodStop) ? #00FF00 : na
bgcolor(testPeriodBackgroundColor, transp=97)

testPeriod() => true
// Component Code Stop

//vortex histogram
short_input = input(6, minval = 1)
long_input = input(27, minval = 1)
longer_input = input(72, minval = 1)
longest_input = input(234, minval = 1)

short = sma(close, short_input)
long = sma(close, long_input)
longer = sma(close, longer_input)
longest = sma(close, longest_input)

hist = short - long
longhist = short - longer
longesthist = short - longest

hist_fractal = input(3, minval = 0)
longhist_fractal = input(2, minval = 0)
longesthist_fractal = input(4, minval = 0)

vortexhist = avg((hist / hist_fractal), (longhist / longhist_fractal), (longesthist / longesthist_fractal))

crossover_calc = vortexhist > 0 and vortexhist[1] < 0
crossunder_calc = vortexhist < 0 and vortexhist[1] > 0

crossover2 = crossover(vortexhist, 0)
crossunder2 = crossunder(vortexhist, 0)

hist_color = hist > 0? fuchsia : purple
longhist_color = longhist > 0? olive : orange
longesthist_color = longesthist > 0? teal : blue
vortexhist_color = vortexhist >= 0? green : red

plot(longesthist, "Longest Ocillator", style = histogram, color = longesthist_color, transp = 5)
plot(longhist, "Longer Ocillator", style = histogram, color = longhist_color, transp = 30)
plot(hist, "Short Ocillator", style = histogram, color = hist_color, transp = 30)
plot(vortexhist, "Vortex Ocillator", style = columns, color = vortexhist_color, transp = 40)
plotshape(crossover_calc,title = "Crossover",location = location.bottom, style = shape.triangleup, size = size.small, color = green)
plotshape(crossunder_calc,title = "Crossunder",location = location.bottom, style = shape.triangledown, size = size.small, color = red)

//micro
micro_ema_length = input(6,"Micro EMA Length")
micro = ema(vortexhist, micro_ema_length)
plot(micro, title = "micro", linewidth = 1, color = white)
microup = crossover(vortexhist, micro)
microdown = crossunder(vortexhist, micro)

//new micro signals
xmicroup = microup and vortexhist >=0 or crossover_calc
xmicrodown = microdown and vortexhist >=0 or crossunder_calc
plotshape(xmicroup, title = "Micro up", style = shape.circle, color = olive, location = location.bottom, size = size.tiny)
plotshape(xmicrodown, title = "Micro down", style = shape.circle, color = fuchsia, location = location.bottom, size = size.tiny)

//optional strategy options for backtesting, comment out the alertcondition rows and swap the top study row for the strategy row to compile as strategy
if testPeriod()
    strategy.entry("buy", true, 1, when = xmicroup, limit = low)
if testPeriod()
    strategy.close("buy", when = xmicrodown)

   

//if (xmicroup)
    //strategy.entry("My Long Entry Id", strategy.long)
//if (xmicroup)
    //strategy.exit("My Short Exit Id", "My Short Entry Id")
//if (xmicrodown)
    //strategy.exit("My Long Exit Id", "My Long Entry Id")

  




もっと