
この戦略は,波動力の指標 ((Vortex Indicator, VI) に基づくトレンド追跡取引システムである.この戦略は,価格変動の正動量 ((VI+) と負動量 ((VI-) を計算することによって,市場トレンドの転換点を認識し,重要な指標の交差点で取引シグナルを生成する.この戦略は,滑りやすい移動平均 ((SMA) を採用して,シグナルの信頼性を高めるために,ノイズを減らす.
戦略の核心は,VI+とVI-の相対的な強さを比較してトレンドの方向を判断することです.具体的には,計算手順は以下の通りです.
この戦略は,波動力の指標の革新的な適用によって,トレンドを追跡する取引のための信頼できる分析フレームワークを提供します.ある程度の遅れがあるにもかかわらず,合理的なパラメータ最適化とリスク管理措置によって,安定した取引システムを構築することができます.トレーダーは,実用化する前に十分なフィットバックテストを行い,特定の市場の特徴に応じてターゲティング最適化することをお勧めします.
/*backtest
start: 2022-02-11 00:00:00
end: 2025-02-08 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Vortex Strategy with Signals", shorttitle="VI_Strat", overlay=true)
// Užívateľský vstup
length = input.int(14, title="Period", minval=1)
//------------------------------------
// 1) Výpočet Vortexu
//------------------------------------
vmPlus = math.abs(high - low[1])
vmMinus = math.abs(low - high[1])
trueRange = math.max(math.max(high - low, math.abs(high - close[1])), math.abs(low - close[1]))
// SMA vyhladzovanie
smoothedVMPlus = ta.sma(vmPlus, length)
smoothedVMMinus = ta.sma(vmMinus, length)
smoothedTrueRange = ta.sma(trueRange, length)
// Vortex Indikátory
viPlus = smoothedVMPlus / smoothedTrueRange
viMinus = smoothedVMMinus / smoothedTrueRange
//------------------------------------
// 2) Plot indikátora
//------------------------------------
plot(viPlus, color=color.green, title="VI+")
plot(viMinus, color=color.red, title="VI-")
//------------------------------------
// 3) Definícia signálov
//------------------------------------
bullSignal = ta.crossover(viPlus, viMinus) // VI+ pretína VI- smerom nahor
bearSignal = ta.crossunder(viPlus, viMinus) // VI+ pretína VI- smerom nadol
//------------------------------------
// 4) Vizualizácia signálov na grafe
//------------------------------------
plotshape(bullSignal,
title="Bull Signal",
style=shape.labelup,
location=location.belowbar,
color=color.green,
text="BUY",
textcolor=color.white,
size=size.small)
plotshape(bearSignal,
title="Bear Signal",
style=shape.labeldown,
location=location.abovebar,
color=color.red,
text="SELL",
textcolor=color.white,
size=size.small)
//------------------------------------
// 5) STRATEGY LOGIC
//------------------------------------
if bullSignal
strategy.entry("Long", strategy.long)
if bearSignal
strategy.entry("Short", strategy.short)