
反逆波動率突破策は,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")