
یہ ایک دن ٹریڈنگ حکمت عملی ہے جو خاص طور پر نیس ڈیک 100 مائکرو فیوچر کے لئے ڈیزائن کی گئی ہے۔ حکمت عملی کا بنیادی ڈبل مساوی لائن سسٹم استعمال کرتا ہے جس میں ٹریڈ ویٹڈ اوسط قیمت ((VWAP) کو رجحان کی تصدیق کے طور پر شامل کیا گیا ہے ، اور حقیقی اتار چڑھاؤ کی حد ((ATR) کے ذریعے اسٹاپ نقصان کی پوزیشن کو متحرک طور پر ایڈجسٹ کیا گیا ہے۔ یہ حکمت عملی مارکیٹ کے رجحانات کو سخت رسک کنٹرول اور متحرک پوزیشن مینجمنٹ کے ذریعے پکڑنے کے لئے تیار کی گئی ہے ، جبکہ فنڈز کو محفوظ رکھا جاتا ہے۔
حکمت عملی مندرجہ ذیل بنیادی اجزاء پر مبنی ہے:
اس حکمت عملی نے یکساں لکیری نظام اور وی ڈبلیو اے پی کے ساتھ مل کر ایک مضبوط رجحان سے باخبر رہنے کا نظام قائم کیا ہے اور متعدد سطح کے خطرے کے کنٹرول کے طریقہ کار کے ذریعہ فنڈز کی حفاظت کی ہے۔ اس حکمت عملی کی سب سے بڑی خصوصیت اس کی لچک اور خطرے کے انتظام کی صلاحیت ہے ، جو اے ٹی آر کے ذریعے متحرک طور پر مختلف پیرامیٹرز کو ایڈجسٹ کرتی ہے ، جس سے یہ مختلف مارکیٹ کے ماحول میں مستحکم کارکردگی کو برقرار رکھنے کے قابل بناتا ہے۔ یہ حکمت عملی خاص طور پر دن کے اندر تجارت کرنے کے لئے موزوں ہے نیسٹیک 100 مائیکرو فیوچر ، لیکن اس کے لئے تاجروں کو خطرے کے کنٹرول کے قواعد پر سختی سے عمل درآمد کرنے اور مارکیٹ میں تبدیلیوں کے مطابق پیرامیٹرز کو ایڈجسٹ کرنے کی ضرورت ہے۔
/*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()