
La estrategia es un sistema de trading de análisis técnico avanzado que combina indicadores relativamente débiles (RSI) y la banda de Brin (BB). Utilizando ambos indicadores de manera sincronizada, busca oportunidades de inversión de alta probabilidad en áreas de sobreventa y sobreventa en el mercado. La estrategia utiliza una media móvil de 20 períodos como línea de referencia para la banda de Brin, que se pone en marcha a un descenso de dos veces la diferencia estándar, mientras que el análisis de dinámica utiliza el RSI de 14 períodos y genera una señal de negociación cuando el RSI supera el 30⁄70 y el precio toca el límite de la banda de Brin.
La lógica central de la estrategia se basa en la interacción de dos indicadores técnicos principales:
La estrategia construye un sistema de negociación completo a través de la sinergia entre el RSI y el Brinbelt. No solo ofrece señales de entrada y salida claras, sino que también tiene un buen mecanismo de control de riesgo. Aunque existen algunos riesgos inherentes, la estrategia espera mantener un rendimiento estable en diferentes entornos de mercado a través de la optimización y el perfeccionamiento continuos.
/*backtest
start: 2024-10-31 00:00:00
end: 2025-02-18 08:00:00
period: 30m
basePeriod: 30m
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("RSI + Bollinger Bands Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Bollinger Bands Settings
bbLength = input.int(20, title="BB Length")
bbStdDev = input.float(2.0, title="BB Standard Deviation")
basis = ta.sma(close, bbLength)
dev = bbStdDev * ta.stdev(close, bbLength)
upperBB = basis + dev
lowerBB = basis - dev
// Plot Bollinger Bands
plot(basis, color=color.orange, title="BB Basis")
plot(upperBB, color=color.blue, title="Upper Bollinger Band")
plot(lowerBB, color=color.blue, title="Lower Bollinger Band")
fill(plot(upperBB), plot(lowerBB), color=color.blue, transp=90, title="BB Fill")
// RSI Settings
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
rsi = ta.rsi(close, rsiLength)
// Plot RSI on separate pane
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
plot(rsi, color=color.purple, title="RSI", linewidth=2, display=display.none) // Hidden on main chart
// Long Condition: RSI crosses above oversold and price touches lower BB
longCondition = ta.crossover(rsi, rsiOversold) and close <= lowerBB
if (longCondition)
strategy.entry("Long", strategy.long)
// Short Condition: RSI crosses below overbought and price touches upper BB
shortCondition = ta.crossunder(rsi, rsiOverbought) and close >= upperBB
if (shortCondition)
strategy.entry("Short", strategy.short)
// Exit Long: RSI crosses above overbought or price crosses above basis
exitLong = ta.crossunder(rsi, rsiOverbought) or close >= basis
if (exitLong)
strategy.close("Long")
// Exit Short: RSI crosses below oversold or price crosses below basis
exitShort = ta.crossover(rsi, rsiOversold) or close <= basis
if (exitShort)
strategy.close("Short")