
Il s’agit d’une stratégie de négociation intraday conçue spécifiquement pour les micro-futures du Nasdaq 100. Le cœur de la stratégie utilise un système bi-linéaire combinant une confirmation de tendance du prix moyen pondéré par la transaction (VWAP) et un ajustement dynamique de la position d’arrêt par l’amplitude de fluctuation réelle (ATR). La stratégie capture les tendances du marché grâce à un contrôle strict des risques et à une gestion dynamique des positions, tout en maintenant la sécurité des fonds.
La stratégie repose sur les éléments fondamentaux suivants :
La stratégie est caractérisée par sa capacité d’adaptation et de gestion des risques, qui lui permet d’ajuster les paramètres de manière dynamique via l’ATR, ce qui lui permet de maintenir une performance stable dans différents environnements de marché. La stratégie est particulièrement adaptée pour le day trading des micro-futures NASDAQ 100, mais nécessite que les traders appliquent strictement les règles de contrôle des risques et ajustent les paramètres en fonction des changements du marché.
/*backtest
start: 2024-02-25 00:00:00
end: 2025-02-22 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("Nasdaq 100 Micro - Optimized Risk Management", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === INPUTS ===
riskPerTrade = input(1500, title="Max Risk Per Trade ($)")
profitTarget = input(3000, title="Target Profit Per Trade ($)")
maxWeeklyLoss = input(7500, title="Max Weekly Loss ($)")
emaShort = input(9, title="Short EMA Period")
emaLong = input(21, title="Long EMA Period")
vwapEnabled = input(true, title="Use VWAP?")
contractSizeMax = input(50, title="Max Micro Contracts per Trade")
atrLength = input(14, title="ATR Length")
// === INDICATORS ===
emaFast = ta.ema(close, emaShort)
emaSlow = ta.ema(close, emaLong)
vwapLine = ta.vwap(close)
atrValue = ta.atr(atrLength)
// === CONDITIONS ===
// Long Entry: EMA Crossover + Above VWAP
longCondition = ta.crossover(emaFast, emaSlow) and (not vwapEnabled or close > vwapLine)
// Short Entry: EMA Crossunder + Below VWAP
shortCondition = ta.crossunder(emaFast, emaSlow) and (not vwapEnabled or close < vwapLine)
// Position Size Calculation (Adjusted for Shorts)
riskPerPoint = 5 // MNQ Micro Futures = $5 per point per contract
stopLossPointsLong = atrValue * 2 // More room for longs
stopLossPointsShort = atrValue * 1.5 // Tighter for shorts
contractsLong = math.min(contractSizeMax, math.floor(riskPerTrade / (stopLossPointsLong * riskPerPoint)))
contractsShort = math.min(math.floor(contractsLong * 0.75), contractSizeMax) // Shorts use 75% of long size
// Stop Loss & Take Profit
longSL = close - stopLossPointsLong
longTP = close + (stopLossPointsLong * 3) // 1:3 Risk-Reward for longs
shortSL = close + stopLossPointsShort
shortTP = close - (stopLossPointsShort * 2) // 1:2 Risk-Reward for shorts
// === BREAK-EVEN STOP MECHANISM ===
longBE = close + (stopLossPointsLong * 1.5) // If price moves 50% to TP, move SL to entry
shortBE = close - (stopLossPointsShort * 1) // More aggressive on shorts
// === TRAILING STOP LOGIC ===
trailStopLong = close - (atrValue * 1.5)
trailStopShort = close + (atrValue * 1)
// === EXECUTION ===
// Check for weekly loss limit
weeklyLoss = strategy.netprofit < -maxWeeklyLoss
if (longCondition and not weeklyLoss)
strategy.entry("Long", strategy.long, contractsLong)
strategy.exit("TakeProfitLong", from_entry="Long", limit=longTP, stop=longSL, trail_points=atrValue * 1.5, trail_offset=atrValue * 0.5)
strategy.exit("BreakEvenLong", from_entry="Long", stop=longBE, when=close >= longBE)
if (shortCondition and not weeklyLoss)
strategy.entry("Short", strategy.short, contractsShort)
strategy.exit("TakeProfitShort", from_entry="Short", limit=shortTP, stop=shortSL, trail_points=atrValue * 1, trail_offset=atrValue * 0.5)
strategy.exit("BreakEvenShort", from_entry="Short", stop=shortBE, when=close <= shortBE)
// === STOP TRADING IF WEEKLY LOSS EXCEEDED ===
if (weeklyLoss)
strategy.close_all()