
This strategy is a breakout trading system that combines Bollinger Bands, Relative Strength Index (RSI), and Heikin Ashi candlesticks. Through the coordinated use of multiple technical indicators, it effectively filters market noise and captures high-probability breakout trading opportunities. The strategy adopts trend-following and momentum trading concepts, entering after breakout confirmation and using Heikin Ashi reversal and RSI overbought conditions as exit signals.
The core logic is based on the synergy of three technical indicators: 1. Bollinger Bands identify price volatility range and potential breakout positions, using 20-day moving average as the middle band, with upper and lower bands 2 standard deviations away. 2. RSI confirms price momentum, using 14-period settings, with RSI above 50 indicating upward momentum. 3. Heikin Ashi candlesticks filter short-term price fluctuations through weighted averages of open, high, low, and close prices.
Entry conditions require: - Heikin Ashi candles turn from red to green - Close price breaks above upper Bollinger Band - RSI above 50
Exit conditions meet either: - Heikin Ashi candles turn from green to red - RSI reaches overbought level of 70
Risk control suggestions: - Set stop-loss positions to protect capital - Adjust Bollinger Bands parameters based on market volatility - Incorporate additional market analysis dimensions - Strictly execute trading plan
This strategy constructs a relatively complete trend-following trading system through the combined application of Bollinger Bands, RSI, and Heikin Ashi candlesticks. The strategy logic is clear with explicit execution standards, demonstrating good practicality. Through parameter optimization and additional auxiliary indicators, the strategy’s stability and reliability can be further improved. Traders are advised to conduct thorough backtesting before live implementation and make appropriate adjustments based on market characteristics and personal risk preferences.
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-16 08:00:00
period: 6h
basePeriod: 6h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Bollinger Bands + RSI + Heikin Ashi Breakout", overlay=true)
// Input Settings
bbLength = input.int(20, title="Bollinger Bands Length")
bbMultiplier = input.float(2, title="Bollinger Bands Multiplier")
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.float(70, title="RSI Overbought Level")
// Bollinger Bands
basis = ta.sma(close, bbLength)
dev = bbMultiplier * ta.stdev(close, bbLength)
upperBB = basis + dev
lowerBB = basis - dev
// Heikin Ashi Candle Calculations
var float heikinOpen = na // Declare `heikinOpen` with an undefined initial value
var float heikinClose = na // Declare `heikinClose` with an undefined initial value
// Update Heikin Ashi values
heikinClose := (open + high + low + close) / 4
heikinOpen := na(heikinOpen[1]) ? (open + close) / 2 : (heikinOpen[1] + heikinClose[1]) / 2
heikinHigh = math.max(high, math.max(heikinOpen, heikinClose))
heikinLow = math.min(low, math.min(heikinOpen, heikinClose))
// RSI
rsi = ta.rsi(close, rsiLength)
// Entry Conditions
heikinGreen = heikinClose > heikinOpen
longCondition = heikinGreen and close > upperBB and rsi > 50
// Exit Conditions
heikinRed = heikinClose < heikinOpen
longExitCondition = heikinRed or rsi >= rsiOverbought
// Strategy Execution
if (longCondition)
strategy.entry("Long", strategy.long)
if (longExitCondition)
strategy.close("Long", comment="Exit Long")
// Plotting Bollinger Bands
plot(upperBB, color=color.blue, title="Upper Bollinger Band")
plot(lowerBB, color=color.blue, title="Lower Bollinger Band")
plot(basis, color=color.orange, title="Middle Bollinger Band")
// Heikin Ashi Visualization
plotcandle(heikinOpen, heikinHigh, heikinLow, heikinClose, color=(heikinGreen ? color.green : color.red), title="Heikin Ashi Candles")
// Debugging Signals
plotshape(longCondition, style=shape.labelup, location=location.belowbar, color=color.green, title="Long Entry Signal")
plotshape(longExitCondition, style=shape.labeldown, location=location.abovebar, color=color.red, title="Long Exit Signal")