
이 전략은 여러 기술 지표들을 결합한 복잡한 정량화 거래 시스템이며, 트렌드 추적과 동력 분석을 결합한 방식으로 거래한다. 이 전략은 거래량 중화 평균 가격 (VWAP), 지수 이동 평균 (EMA), 상대적으로 강한 지표 (RSI) 과 같은 여러 지표를 통합하여 포괄적인 거래 의사 결정 프레임워크를 구성한다. 이 전략은 시장의 추세와 동력의 확인에 초점을 맞추고 있으며, 엄격한 위험 제어 조치를 취하고 있다.
전략은 거래 신호를 확인하기 위해 여러 층의 필터링 메커니즘을 사용합니다. 가격이 VWAP와 EMA20 위에 있고 SuperTrend 지표가 상승하는 경향을 보인다면, 시스템은 더 많은 기회를 찾기 시작합니다. 동력을 확인하기 위해 RSI 지표와 결합하여 부린을 사용하여 변동적 확장을 식별합니다. 전략은 또한 MACD 지표를 통합하여 트렌드의 지속성을 확인하고 ADX를 사용하여 트렌드 강도를 측정합니다.
이 전략은 여러 가지 기술 지표를 통합하여 비교적 완벽한 거래 시스템을 구축했습니다. 약간의 지연 및 변수 최적화 위험이 있지만, 엄격한 위험 제어 및 다중 신호 확인을 통해 전략은 좋은 안정성과 적응력을 보여줍니다. 지속적인 최적화 및 개선으로 이 전략은 다양한 시장 환경에서 안정적인 성능을 유지할 수 있습니다.
/*backtest
start: 2024-02-10 00:00:00
end: 2025-02-09 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Nifty 1-Min Advanced Scalping", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=200)
// Indicators
vwap = ta.vwap(close)
ema20 = ta.ema(close, 20)
supertrendFactor = 2
supertrendLength = 10
[superTrend, superTrendDirection] = ta.supertrend(supertrendFactor, supertrendLength)
atr = ta.atr(14)
psar = ta.sar(0.02, 0.2, 0.2)
rsi = ta.rsi(close, 14)
[bbMid, bbUpper, bbLower] = ta.bb(close, 20, 2)
[macdLine, macdSignal, _] = ta.macd(close, 12, 26, 9)
[adx, _, _] = ta.dmi(14, 14)
stochRsi = ta.stoch(close, 14, 3, 3)
// Buy Condition
buyCondition = close > vwap and close > ema20 and superTrendDirection == 1 and rsi > 50 and close > bbMid and close > psar and macdLine > macdSignal and adx > 25 and stochRsi > 20
// Sell Condition
sellCondition = close < vwap and close < ema20 and superTrendDirection == -1 and rsi < 50 and close < bbMid and close < psar and macdLine < macdSignal and adx > 25 and stochRsi < 80
// Stop Loss & Take Profit
sl = atr * 1.5
long_sl = close - sl
short_sl = close + sl
tp = sl * 1.5
long_tp = close + tp
short_tp = close - tp
// Execute Trades
if buyCondition
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", from_entry="Long", stop=long_sl, limit=long_tp)
if sellCondition
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", from_entry="Short", stop=short_sl, limit=short_tp)
// Plot indicators
plot(vwap, title="VWAP", color=color.blue)
plot(ema20, title="EMA 20", color=color.orange)
plot(superTrend, title="SuperTrend", color=color.green)
plot(psar, title="Parabolic SAR", color=color.red, style=plot.style_cross)
plot(bbMid, title="Bollinger Mid", color=color.purple)
plot(macdLine, title="MACD Line", color=color.blue)
plot(macdSignal, title="MACD Signal", color=color.red)
plot(adx, title="ADX", color=color.green)
plot(stochRsi, title="Stochastic RSI", color=color.orange)
// Alerts
alertcondition(buyCondition, title="Buy Signal", message="Buy Signal Triggered")
alertcondition(sellCondition, title="Sell Signal", message="Sell Signal Triggered")