
이것은 VWAP (거래량 가중 평균 가격) 편차와 OBV (에너지 유동 지수) RSI의 복합 평균 회귀를 결합한 거래 전략이다. 이 전략은 가격의 VWAP에 대한 편차 정도를 모니터링하고, OBV-RSI 지수의 오버 바이 오버 셀 상태가 시장의 극단적 인 상태가 발생했을 때 거래한다. 가격이 VWAP에서 특정 정도에 도달하고 OBV-RSI 지표가 오버 바이 또는 오버 셀 상태를 표시 할 때, 전략은 거래 신호를 발산하고, 가격이 VWAP로 돌아가는 시에는 평지한다.
이 전략은 두 가지 핵심 지표에 기반합니다.
포지션 개설 조건:
평지 조건:
이 전략은 VWAP 편향과 OBV-RSI 지표를 결합하여 안정적인 평균 회귀 거래 시스템을 구축한다. 전략은 극단적인 시장 상태에서 거래 기회를 찾고, 여러 위험 제어 메커니즘을 통해 자금 안전을 보호한다.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-16 08:00:00
period: 4h
basePeriod: 4h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy('[Hoss] Combined Strategy', overlay=true)
// Indikator 1: [Hoss] VWAP Deviation
indicator_vwap = input.bool(true, title="Show VWAP Deviation Indicator", group="Visibility")
length = input.int(60, title="VWAP Length", group="VWAP Settings")
src = input(close, title="Source", group="VWAP Settings")
// Berechnungen für VWAP
vwmean = ta.wma(src, length)
dev = ta.stdev(src, length)
basis = vwmean
upper_dev2 = vwmean + dev * 2
lower_dev2 = vwmean - dev * 2
// Plotting VWAP Deviation
plot(indicator_vwap ? basis : na, color=color.gray, title='Basis', linewidth=2)
plot1 = plot(indicator_vwap ? upper_dev2 : na, color=color.red, title='Upper Dev 2', linewidth=2)
plot2 = plot(indicator_vwap ? lower_dev2 : na, color=color.green, title='Lower Dev 2', linewidth=2)
fill(plot1, plot2, color=color.new(color.green, 80), title='Deviation Band')
// Indikator 2: [Hoss] OBV RSI
indicator_obv_rsi = input.bool(true, title="Show OBV RSI Indicator", group="Visibility")
len = input.int(14, title="RSI Length", group="OBV RSI Settings")
obv = ta.cum(ta.change(src) > 0 ? volume : ta.change(src) < 0 ? -volume : 0)
rsi = ta.rsi(obv, len)
// Plotting OBV RSI
plot(indicator_obv_rsi ? rsi : na, color=color.blue, title="OBV RSI", linewidth=2)
hline(70, title="Overbought", color=color.red, linestyle=hline.style_dashed)
hline(30, title="Oversold", color=color.green, linestyle=hline.style_dashed)
// Strategie: Kauf- und Verkaufssignale
long_condition = not na(rsi) and rsi <= 30 and close <= lower_dev2
short_condition = not na(rsi) and rsi >= 70 and close >= upper_dev2
if (long_condition)
strategy.entry("Long", strategy.long, stop=close * 0.994) // Stop-Loss bei 0.6%
if (short_condition)
strategy.entry("Short", strategy.short, stop=close * 1.006) // Stop-Loss bei 0.6%
// Flash Close beim Erreichen des VWAP
if (strategy.position_size > 0 and close >= basis)
strategy.close("Long")
if (strategy.position_size < 0 and close <= basis)
strategy.close("Short")