ベガス・トレンド・ウェーブ戦略

作者: リン・ハーンチャオチャン, 日時: 2023-09-11 15:23:35
タグ:

この戦略は,トレンド方向を決定するために,複数のEMAペアの間の価格差のパーセントを計算し,ベガス波に基づいて取引します.

具体的には,現在の価格,144期 EMA,169期 EMA,233期 EMAとの間の百分比値差を計算する.前もって設定されたポジティブな差値に達すると,Long信号が生成される.価格が3つのEMAを下回り,144期 EMAが233期 EMAを下回るとショート信号が起動する.

EMAコンボは,単一のEMAと比較してより多くの偽ブレイクをフィルターします.また,ベガス波自体には,強力なトレンド分析のための複数のEMAが含まれています.

しかし,EMAは固有の遅延があり,最適なエントリを特定することはできません.波理論には主観性があり,パフォーマンスが主にパラメータ最適化に依存しています.ライブ結果の慎重な評価が必要です.

全体的に,ベガストレンドウェーブ戦略は,トレンド市場の良い結果のためにEMA分析と波理論をシネージ化しています. しかし,リスク管理は長期的適用には不可欠です.


/*backtest
start: 2023-09-03 00:00:00
end: 2023-09-10 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy("Vegas Wave Strategy", overlay=true)

ema144 = ema(close, 144)
ema169 = ema(close, 169)
ema233 = ema(close, 233)

current = close

upd144 = input(title="EMA144 percent difference from EMA233", type=float, defval=0.1)
upd169 = input(title="EMA169 percent difference from EMA233", type=float, defval=0.1)
upd_current = input(title="Current price percent difference from EMA233", type=float, defval=0.1)

//pDiff - Percentage Difference
pDiff(x, y) =>
    ((x-y)/x)*100

gtDiff(x, y) =>
    x > y


pd144 = pDiff(ema144, ema233)
pd169 = pDiff(ema169, ema233)
pd_current = pDiff(current,ema233)

plot(ema144,color=orange, linewidth=2, transp=0, title="144 EMA")
plot(ema169,color=blue,linewidth=2, transp=0, title="169 EMA")
plot(ema233,color=red,linewidth=2, transp=0, title="233 EMA")


//plot(current, color=white, title="Current Candle")


if (gtDiff(pd_current, upd_current) and gtDiff(pd144, upd144) and gtDiff(pd169, upd169))
    strategy.entry("buy", strategy.long, when=strategy.position_size <=0)

// if (ema8 > ema55 and ema13 > ema55 and ema21 > ema55 and current > ema55 and pd_current > upd_current)
//     strategy.entry("buy", strategy.long, 10000, when=strategy.position_size <=0)
    
if (current < ema144 and current < ema169 and current < ema233 and ema144 <= ema233)
    strategy.entry("sell", strategy.short, when=strategy.position_size > 0)

もっと