
이 전략은 Nifty 50 지수를 기반으로 한 고주파수 수량 거래 전략이다. 그것은 Nifty 50 지수의 가격 변화를 추적하여 오픈 이익 변화와 결합하여 지원 지점 근처에서 낮은 가격에 구매하고 저항 지점 근처에서 높은 가격에 판매하는 작업을 수행하여 수익을 창출합니다.
이 전략은 먼저 Nifty 50 지수의 오픈 이윤 변화 상황을 얻습니다. 그리고 그것은 설정된 지원 저항 수준과 오픈 이득 변화의 폭에 대한 하락값에 따라 구매 및 판매 신호를 생성합니다. 구체적으로:
이런 식으로, 지지부위 근처에서 낮은 가격에 구매할 수 있고, 저항부위 근처에서 높은 가격에 판매할 수 있으며, 이득을 얻을 수 있다.
이 전략에는 다음과 같은 장점이 있습니다.
이 전략에는 몇 가지 위험도 있습니다.
이 전략은 다음의 몇 가지 측면에서 더 개선될 수 있습니다.
이 전략은 Nifty 50을 기반으로 한 간단한 효율적인 양적 거래 전략입니다. 이 전략은 운영 빈도가 높고, 개방된 이해관계 정보를 활용하고, 동적 조달을 지원하는 등의 장점이 있으며, 개선할 여지가 있습니다.
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-24 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Intraday Nifty 50 Bottom Buying and Selling with OI Strategy", overlay=true)
// Input parameters
niftySymbol = input("NIFTY50", title="Nifty 50 Symbol")
oiLength = input(14, title="Open Interest Length")
supportLevel = input(15000, title="Support Level")
resistanceLevel = input(16000, title="Resistance Level")
buyThreshold = input(1, title="Buy Threshold")
sellThreshold = input(-1, title="Sell Threshold")
// Fetch Nifty 50 open interest
oi = request.security(niftySymbol, "D", close)
// Calculate open interest change
oiChange = oi - ta.sma(oi, oiLength)
// Plot support and resistance levels
plot(supportLevel, color=color.green, title="Support Level")
plot(resistanceLevel, color=color.red, title="Resistance Level")
// Plot open interest and open interest change
plot(oi, color=color.blue, title="Open Interest")
plot(oiChange, color=color.green, title="Open Interest Change")
// Trading logic
buySignal = close < supportLevel and oiChange > buyThreshold
sellSignal = close > resistanceLevel and oiChange < sellThreshold
// Execute trades
strategy.entry("Buy", strategy.long, when=buySignal)
strategy.entry("Sell", strategy.short, when=sellSignal)