
Strategi ini menggabungkan Bollinger Bands dan RSI untuk mengidentifikasi titik balik pasar potensial melalui metode konfirmasi ganda. Masuk ke posisi overhead ketika harga melewati Bollinger Bands dan RSI mengkonfirmasi kondisi oversold; Masuk ke posisi overhead ketika harga melewati Bollinger Bands dan RSI mengkonfirmasi kondisi overbought. Strategi ini melakukan manajemen risiko dengan menerapkan stop loss tetap dan melacak stop loss, yang bertujuan untuk menangkap peluang perdagangan reversal dengan probabilitas tinggi, sekaligus melindungi keamanan dana.
Strategi ini didasarkan pada prinsip regresi rata-rata dan mekanisme konfirmasi dinamis. Blinking membantu mengidentifikasi titik teratas harga relatif terhadap volatilitas baru-baru ini, sementara RSI mengkonfirmasi apakah pasar benar-benar berada dalam keadaan overbought atau oversold. Prinsip inti meliputi:
Pada implementasi kode, strategi menggunakan SMA pada siklus 30 hari untuk menghitung Brinell mid-axis, dengan standar deviasi 2.0, dan menggunakan RSI pada siklus 14 hari sebagai konfirmasi momentum. Ketika harga melintasi lintasan dan RSI lebih tinggi dari 70, sinyal overhead dipicu; Bila harga melintasi lintasan dan RSI lebih rendah dari 30, sinyal multi-head dipicu.
Strategi Brin-RSI dual confirmation mean reversion strategy with tracking stop loss protection mewakili metode trading reversal pasar yang dipikirkan dengan baik. Strategi ini bertujuan untuk menangkap reversal probabilitas tinggi dengan mengkombinasikan sinyal volatilitas Brin-RSI dengan konfirmasi dinamika RSI, sambil memfilter sinyal palsu.
/*backtest
start: 2024-08-11 00:00:00
end: 2025-08-09 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("BB & RSI Trailing Stop Strategy", overlay=true, initial_capital=10000)
// --- Inputs for Bollinger Bands, RSI, and Trade Management ---
bb_length = input.int(30, title="BB Length", minval=1)
bb_mult = input.float(2.0, title="BB StdDev", minval=0.001, maxval=50)
rsi_length = input.int(14, title="RSI Length", minval=1)
rsi_overbought = input.int(70, title="RSI Overbought Level", minval=1)
rsi_oversold = input.int(30, title="RSI Oversold Level", minval=1)
// We only need an input for the fixed stop loss now.
fixed_stop_points = input.int(40, title="Fixed Stop Loss Points", minval=1)
// --- Define Trailing Stop Value ---
// The trailing stop is hardcoded to 40 points as requested.
trailing_stop_points = 40
// --- Calculate Indicators ---
// Bollinger Bands
basis = ta.sma(close, bb_length)
dev = bb_mult * ta.stdev(close, bb_length)
upper = basis + dev
lower = basis - dev
// RSI
rsi_value = ta.rsi(close, rsi_length)
// --- Plot the Indicators on the chart ---
plot(basis, "Basis", color=color.new(color.gray, 0))
plot(upper, "Upper", color=color.new(color.red, 0))
plot(lower, "Lower", color=color.new(color.green, 0))
// --- Define Entry Conditions ---
// Short entry when price crosses upper band AND RSI is overbought
short_condition = ta.crossover(close, upper) and (rsi_value > rsi_overbought)
// Long entry when price crosses under lower band AND RSI is oversold
long_condition = ta.crossunder(close, lower) and (rsi_value < rsi_oversold)
// --- Execute Trades and Manage Exits ---
if (strategy.position_size == 0)
// Logic for SHORT trades
if (short_condition)
strategy.entry("BB/RSI Short", strategy.short)
// Logic for LONG trades
if (long_condition)
strategy.entry("BB/RSI Long", strategy.long)
// Apply the fixed stop loss and trailing stop to any open position
strategy.exit(id="Exit Order",
loss=fixed_stop_points,
trail_points=trailing_stop_points,
trail_offset=0)