
이 전략은 가격대수 트렌드 지표 ((PVT) 와 그 지수 이동 평균 ((EMA) 의 교차를 기반으로 한 트렌드 추적 거래 시스템입니다. 전략은 PVT 지표와 그 EMA의 교차 상황을 모니터링하여 시장 추세의 변화를 식별하여 잠재적인 거래 기회를 잡습니다. 이 방법은 가격 변화와 거래량의 변화를 결합하여 시장의 실제 움직임을 더 정확하게 반영합니다.
이 전략의 핵심은 PVT 지표를 이용하는 것으로, 이 지표는 가격 변화와 거래량을 결합하여 시장 추세를 추적한다. 구체적으로, 당일 가격 변화의 비율과 당일 거래량의 곱셈으로 PVT 값을 더한다. 그리고 PVT의 20주기 EMA를 기준선으로 계산한다. PVT가 EMA를 상향으로 통과하면 다중 신호를 생성하고, PVT가 EMA를 하향으로 통과하면 빈 신호를 생성한다. 이 교차 신호는 시장 추세의 전환점을 결정하는 데 사용됩니다.
PVT-EMA 트렌드 크로스 전략은 가격, 거래량 및 트렌드 분석을 결합한 완전한 거래 시스템입니다. 약간의 지연 및 잘못된 신호의 위험이 있지만 적절한 최적화 및 위험 관리를 통해 전략은 신뢰할 수있는 거래 도구가 될 수 있습니다. 거래자는 실제 사용 전에 충분한 피드백을 수행하고 특정 시장 특성에 따라 매개 변수 설정을 조정하는 것이 좋습니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-25 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © PakunFX
//@version=5
strategy(title="PVT Crossover Strategy", shorttitle="PVT Strategy", overlay=false, calc_on_every_tick=true)
// PVTの計算
var cumVol = 0.
cumVol += nz(volume)
if barstate.islast and cumVol == 0
runtime.error("No volume is provided by the data vendor.")
src = close
pvt = ta.cum(ta.change(src) / src[1] * volume)
// EMAの計算(PVTをソースに使用)
emaLength = input.int(20, minval=1, title="EMA Length")
emaPVT = ta.ema(pvt, emaLength)
// プロットをオフにする
plot(emaPVT, title="EMA of PVT", color=#f37f20, display=display.none)
// クロスオーバー戦略
longCondition = ta.crossover(pvt, emaPVT)
shortCondition = ta.crossunder(pvt, emaPVT)
// シグナル表示もオフにする
plotshape(series=longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY", display=display.none)
plotshape(series=shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL", display=display.none)
// 戦略エントリー
if (longCondition)
strategy.entry("Buy", strategy.long)
if (shortCondition)
strategy.entry("Sell", strategy.short)