
Chiến lược phá vỡ tỷ lệ biến động ngược là một chiến lược giao dịch đảo ngược, sử dụng một số chỉ số kỹ thuật như ATR, Bollinger Bands, RSI và MACD để xác định trạng thái cực của thị trường và giao dịch khi thị trường có tín hiệu đảo ngược. Không giống như chiến lược phá vỡ truyền thống, chiến lược này bán khi có tín hiệu lạc quan và mua khi có tín hiệu giảm, để cố gắng nắm bắt cơ hội đảo ngược của thị trường.
Chiến lược này sử dụng các chỉ số sau để đánh giá tín hiệu giao dịch:
Lập luận cốt lõi của chiến lược là:
Chiến lược phá vỡ tỷ lệ biến động ngược là một nỗ lực thú vị, nó sử dụng nhiều chỉ số kỹ thuật để nắm bắt trạng thái cực của thị trường và giao dịch ngược khi thị trường có tín hiệu đảo ngược. Tuy nhiên, chiến lược này cũng có một số rủi ro và cần được sử dụng thận trọng.
/*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")