
La stratégie est un système de trading hybride combinant plusieurs indicateurs d’analyse technique. Elle repose principalement sur un système de courbe moyenne (EMA) pour juger de la tendance du marché, tout en utilisant le niveau de résistance au support (SR) comme signal d’entrée et le contrôle du risque en utilisant l’amplitude de fluctuation réelle (ATR). La stratégie utilise un paramètre de stop-loss dynamique qui peut s’adapter à la volatilité du marché.
La stratégie repose sur les éléments fondamentaux suivants :
Optimisation du filtrage du signal
Optimisation de la gestion des positions
Optimisation des pertes
La stratégie est construite en combinant plusieurs méthodes d’analyse technique avancées pour construire un système de négociation complet. Son avantage central réside dans la capacité d’adaptation et de contrôle des risques du système. Grâce à une optimisation et à une amélioration continues, la stratégie est susceptible de maintenir une performance stable dans différents environnements de marché.
/*backtest
start: 2024-02-18 00:00:00
end: 2025-02-16 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=6
strategy("Multi-Strategy Trader v1 by SUNNY GUHA +91 9836021040 / www.oiesu.com", overlay=true)
// Basic Inputs
supResLookback = input.int(9, "Support/Resistance Lookback")
atrPeriod = input.int(14, "ATR Period")
stopMultiplier = input.float(10.0, "Stop Loss ATR Multiplier")
// Technical Indicators
atr = ta.atr(atrPeriod)
highestHigh = ta.highest(high, supResLookback)
lowestLow = ta.lowest(low, supResLookback)
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
// Basic Strategy Rules
isTrending = math.abs(ema20 - ema50) > atr
longSignal = close > highestHigh[1] or (isTrending and ema20 > ema50 and close > ema20)
shortSignal = close < lowestLow[1] or (isTrending and ema20 < ema50 and close < ema20)
// Entry Logic
if longSignal and strategy.position_size <= 0
strategy.entry("Long", strategy.long)
if shortSignal and strategy.position_size >= 0
strategy.entry("Short", strategy.short)
// Stop Loss Logic
longStopPrice = close - (atr * stopMultiplier)
shortStopPrice = close + (atr * stopMultiplier)
// Exit Logic
if strategy.position_size > 0
strategy.exit("Long Exit", "Long", stop=longStopPrice)
if strategy.position_size < 0
strategy.exit("Short Exit", "Short", stop=shortStopPrice)
// Basic Plotting
plot(ema20, "EMA 20", color.blue)
plot(ema50, "EMA 50", color.red)