
이 전략은 폴링거 대역, 상대적으로 약한 지수 ((RSI) 와 무작위 RSI의 세 가지 기술 지표를 결합하여 가격의 변동률과 동력을 분석하여 시장의 과매매 및 과매매 상태를 찾아 최적의 구매 및 판매 시기를 결정합니다. 이 전략은 20 배 배의 레버리지 모의 옵션 거래를 사용하여 0.60%의 중지 지점과 0.25%의 중지 지점을 설정하고 하루에 한 번 거래하는 것을 제한하여 위험을 제어합니다.
이 전략의 핵심은 폴링 밴드, RSI, 그리고 무작위 RSI의 세 가지 지표를 사용하여 시장 상태를 평가하는 것입니다. 폴링 밴드는 중간 궤도 (중간 궤도 상단 3 표준 차) 과 상단 궤도 (중간 궤도 상단 3 표준 차) 와 하단 궤도 (중간 궤도 하단 3 표준 차) 로 구성되어 있으며, 가격의 변동률을 측정합니다. RSI는 과매 및 과매 조건을 식별하는 데 사용되는 동적 진동기입니다. 이 전략은 14 주기 RSI를 사용합니다.
RSI가 34보다 낮고, 임의의 RSI가 20보다 낮고, 그리고 종결 가격이 하향 궤도 근처 또는 하향 궤도 아래에 있을 때, 구매 신호를 유발한다. RSI가 66보다 높고, 임의의 RSI가 80보다 높고, 그리고 종결 가격이 상향 궤도 근처 또는 상향 궤도 위에 있을 때, 판매 신호를 유발한다. 이 전략은 20배의 레버리지 모의 옵션 거래를 사용하여, 중지 지점은 0.60이며, 중지 지점은 0.25%이다. 또한, 이 전략은 위험을 통제하기 위해 하루에 한 번만 거래한다.
이 전략은 폴링그 띠, RSI 및 무작위 RSI의 3 가지 기술 지표를 결합하여 가격 변동률과 동력 정보를 사용하여 최적의 구매 및 판매 시점을 찾습니다. 전략은 명확한 중지 손실을 설정하고 매일 거래 횟수를 제어하여 위험을 관리합니다. 이 전략은 장점이 있음에도 불구하고 시장 위험, 파라미터 민감성 및 레버리지 위험과 같은 과제와 직면합니다.
/*backtest
start: 2024-05-01 00:00:00
end: 2024-05-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Bollinger Bands + RSI + Stochastic RSI Strategy with OTM Options", overlay=true)
// Define leverage factor (e.g., 20x leverage for OTM options)
leverage = 1
// Bollinger Bands
length = 20
deviation = 3
basis = ta.sma(close, length)
dev = ta.stdev(close, length)
upper = basis + deviation * dev
lower = basis - deviation * dev
// RSI
rsi_length = 14
rsi = ta.rsi(close, rsi_length)
// Stochastic RSI
stoch_length = 14
stoch_k = ta.stoch(close, close, close, stoch_length)
// Entry condition with Bollinger Bands
longCondition = rsi < 34 and stoch_k < 20 and close <= lower
shortCondition = rsi > 66 and stoch_k > 80 and close >= upper
// Plot Bollinger Bands
plot(basis, color=color.blue, title="Basis")
plot(upper, color=color.red, title="Upper Bollinger Band")
plot(lower, color=color.green, title="Lower Bollinger Band")
// Track if a trade has been made today
var int lastTradeDay = na
// Options Simulation: Take-Profit and Stop-Loss Conditions
profitPercent = 0.01 // 1% take profit
lossPercent = 0.002 // 0.2% stop loss
// Entry Signals
if (dayofmonth(timenow) != dayofmonth(lastTradeDay))
if (longCondition)
longTakeProfitPrice = close * (1 + profitPercent)
longStopLossPrice = close * (1 - lossPercent)
strategy.entry("Long", strategy.long, qty=leverage * strategy.equity / close)
strategy.exit("Take Profit Long", from_entry="Long", limit=longTakeProfitPrice, stop=longStopLossPrice)
lastTradeDay := dayofmonth(timenow)
if (shortCondition)
shortTakeProfitPrice = close * (1 - profitPercent)
shortStopLossPrice = close * (1 + lossPercent)
strategy.entry("Short", strategy.short, qty=leverage * strategy.equity / close)
strategy.exit("Take Profit Short", from_entry="Short", limit=shortTakeProfitPrice, stop=shortStopLossPrice)
lastTradeDay := dayofmonth(timenow)