
이 전략은 여러 기술 지표를 유기적으로 결합한 일일 양적 거래 전략으로, 거래량 가중 평균 ((VWAP), 피보나치 리코딩 레벨, 상대적으로 약한 지표 ((RSI) 및 간단한 이동 평균 ((SMA) 을 통합하여 다차원 거래 신호 시스템을 구축합니다. 이 전략은 다른 지표에 대한 조화를 통해 시장의 변동에서 높은 확률의 거래 기회를 찾습니다.
이 전략은 거래 신호를 확인하기 위해 여러 계층의 필터링 메커니즘을 사용합니다.
이것은 포괄적 인, 논리적으로 엄격한 일일 거래 전략이다. 여러 기술 지표의 연동 작용을 통해 위험을 제어하면서 안정적인 수익을 추구한다. 전략은 강력한 실용성과 확장성을 가지고 있으며, 합리적인 매개 변수 최적화 및 위험 통제를 통해 다양한 시장 환경에 적응할 수 있다. 그러나 사용자는 각 지표의 특성을 깊이 이해하고, 매개 변수를 합리적으로 설정하고, 항상 위험 통제에 주의를 기울여야 한다.
/*backtest
start: 2025-01-25 00:00:00
end: 2025-02-18 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
// Pine Script v5 kodu
//@version=5
strategy("Intraday Strategy with VWAP, Fibonacci, RSI, and SMA", shorttitle="Intraday Strategy", overlay=true)
// Input settings
lengthRSI = input.int(14, title="RSI Length")
lengthFib = input.int(5, title="Fibonacci Lookback Period")
timeframeVWAP = input.timeframe("", title="VWAP Timeframe")
smaLength = input.int(9, title="SMA Length")
rsi = ta.rsi(close, lengthRSI)
sma = ta.sma(close, smaLength)
[fibHigh, fibLow] = request.security(syminfo.tickerid, timeframe.period, [high, low])
upper = fibHigh - (fibHigh - fibLow) * 0.382
lower = fibHigh - (fibHigh - fibLow) * 0.618
vwav = request.security(syminfo.tickerid, timeframeVWAP, ta.vwap(close))
price_above_vwap = close > vwav
// Trading conditions
buySignalRSI = ta.crossover(rsi, 30) and close > lower and close < upper and price_above_vwap
sellSignalRSI = ta.crossunder(rsi, 70) and close < upper and close > lower and not price_above_vwap
buySignalSMA = ta.crossover(close, sma)
sellSignalSMA = ta.crossunder(close, sma)
finalBuySignal = buySignalRSI or buySignalSMA
finalSellSignal = sellSignalRSI or sellSignalSMA
// Execute trades
if finalBuySignal
strategy.entry("Buy", strategy.long)
if finalSellSignal
strategy.entry("Sell", strategy.short)
// Plot signals
plotshape(finalBuySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(finalSellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Plot VWAP, SMA, and levels
plot(vwav, color=color.blue, title="VWAP")
plot(sma, color=color.yellow, title="SMA 9")
lineUpper = plot(upper, color=color.orange, title="Fibonacci Upper")
lineLower = plot(lower, color=color.purple, title="Fibonacci Lower")