
La stratégie est un système de trading d’analyse technique avancée qui combine des indicateurs relativement faibles (RSI) et des bandes de bullings (BB). En utilisant ces deux indicateurs de manière synchrone, la stratégie recherche des opportunités de revers avec une forte probabilité dans les zones de survente et de survente du marché.
La logique centrale de la stratégie repose sur la synergie de deux indicateurs techniques majeurs:
La stratégie construit un système de négociation complet grâce à la synergie entre le RSI et les bandes de Brin. Elle fournit non seulement des signaux d’entrée et d’exit clairs, mais dispose également d’un bon mécanisme de contrôle des risques. Bien que certains risques inhérents existent, la stratégie est susceptible de maintenir une performance stable dans différents environnements de marché grâce à une optimisation et à une amélioration continues.
/*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")