
A estratégia de breakout de volatilidade inversa é uma estratégia de negociação de reversão que usa vários indicadores técnicos, como ATR, Brinband, RSI e MACD, para identificar o estado extremo do mercado e negociar quando o mercado apresenta um sinal de reversão. Diferentemente da estratégia de breakout tradicional, a estratégia vende quando surge um sinal de pessimismo e compra quando surge um sinal de pessimismo, tentando assim capturar oportunidades de reversão do mercado.
A estratégia usa os seguintes indicadores para avaliar os sinais de negociação:
A lógica central da estratégia é a seguinte:
A estratégia de ruptura de taxa de flutuação inversa é uma tentativa interessante que utiliza vários indicadores técnicos para capturar o estado extremo do mercado e negociar de forma inversa quando o mercado apresenta sinais de reversão. No entanto, a estratégia também apresenta riscos e precisa ser aplicada com cautela. A solidez e a lucratividade da estratégia podem ser aumentadas ainda mais através da otimização dos parâmetros do indicador, da introdução de medidas de controle de risco e em combinação com outros métodos de análise.
/*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")