베가스 트렌드 웨이브 전략

저자:차오장, 날짜: 2023-09-11 15:23:35
태그:

이 전략은 트렌드 방향을 결정하기 위해 여러 EMA 쌍 사이의 비율 가격 차이를 계산하고 베가스 파도를 기반으로 거래합니다.

특히, 현재 가격, 144주기 EMA, 169주기 EMA 및 233주기 EMA 사이의 비율 가격 차이를 계산합니다. 세 가지 모두 미리 설정된 긍정적 인 차이 문턱을 충족하면 긴 신호가 생성됩니다. 가격이 세 가지 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)

더 많은