
역동성 폭파 전략은 ATR, 브린 띠, RSI 및 MACD와 같은 여러 기술 지표를 사용하여 시장의 극단적 인 상태를 식별하고 시장에서 반전 신호가 발생했을 때 거래하는 반전 거래 전략입니다. 전통적인 폭파 전략과 달리, 이 전략은 시선 신호가 발생했을 때 판매하고 시선 신호가 발생했을 때 구매하여 시장의 반전 기회를 잡으려고합니다.
이 전략은 거래 신호를 판단하기 위해 다음과 같은 지표를 사용합니다.
이 전략의 핵심 논리는 다음과 같습니다.
역 변동률 돌파 전략은 여러 기술적 지표를 사용하여 시장의 극단적 인 상태를 포착하고 시장에서 역전 신호가 발생하면 역전 거래하는 흥미로운 시도입니다. 그러나 이 전략에는 위험이 있으며 신중하게 적용해야합니다. 지표 매개 변수를 최적화하고 위험 관리 조치를 도입하고 다른 분석 방법과 결합하여 전략의 안정성과 수익성을 더욱 향상시킬 수 있습니다.
/*backtest
start: 2024-04-01 00:00:00
end: 2024-04-30 23:59:59
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Volatility Breakout Strategy (Reversed)", overlay=true)
// Indicator Inputs
atrLength = input(14, "ATR Length")
bbLength = input(20, "Bollinger Bands Length")
bbMultiplier = input(2, "Bollinger Bands Multiplier")
rsiLength = input(14, "RSI Length")
macdShortLength = input(12, "MACD Short Length")
macdLongLength = input(26, "MACD Long Length")
macdSignalSmoothing = input(9, "MACD Signal Smoothing")
// Calculate Indicators
atrValue = ta.atr(atrLength)
basis = ta.sma(close, bbLength)
deviation = bbMultiplier * ta.stdev(close, bbLength)
upperBand = basis + deviation
lowerBand = basis - deviation
rsiValue = ta.rsi(close, rsiLength)
[macdLine, signalLine, _] = ta.macd(close, macdShortLength, macdLongLength, macdSignalSmoothing)
// Strategy Conditions (Reversed)
longCondition = ta.crossover(close[1], upperBand[1]) and rsiValue > 50 and macdLine > signalLine
shortCondition = ta.crossunder(close[1], lowerBand[1]) and rsiValue < 50 and macdLine < signalLine
// Strategy Entry (Reversed)
if (longCondition)
strategy.entry("Sell", strategy.short) // Reversed: Buy signal triggers a sell
if (shortCondition)
strategy.entry("Buy", strategy.long) // Reversed: Sell signal triggers a buy
// Plotting
plot(basis, color=color.blue, title="Basis")
plot(upperBand, color=color.red, title="Upper Band")
plot(lowerBand, color=color.green, title="Lower Band")