
یہ حکمت عملی ایک رجحان ٹریڈنگ سسٹم ہے جو انڈیکس کی حرکت پذیری اوسط ((EMA) اور نبض کی اصلاح کے ماڈل ((ICM) پر مبنی ہے۔ یہ قیمتوں کو ای ایم اے کے ساتھ کراسنگ اور اس کے بعد نبض - اصلاح - نبض کی شکل کی نشاندہی کرکے مارکیٹ کے رجحان میں تبدیلیوں کو پکڑتا ہے ، اور جب مخصوص شرائط پوری ہوجاتی ہیں تو تجارت کو انجام دیتا ہے۔ نظام ہر تجارت کے اسٹاپ نقصانات اور اسٹاپ نقصانات کو منظم کرنے کے لئے فکسڈ رسک ریٹرن کا استعمال کرتا ہے۔
حکمت عملی کی بنیادی منطق درج ذیل کلیدی اجزاء پر مبنی ہے:
اس حکمت عملی نے ای ایم اے اور نبض کی اصلاح کے ماڈل کے ساتھ مل کر ایک منطقی طور پر واضح ٹرینڈ ٹریکنگ سسٹم بنایا ہے۔ اس کا فائدہ یہ ہے کہ سگنل واضح اور خطرہ قابل کنٹرول ہے ، لیکن پھر بھی اسے مارکیٹ کی مخصوص خصوصیات کے مطابق بہتر بنانے کی ضرورت ہے۔ مناسب فلٹرنگ شرائط اور متحرک پیرامیٹرز ایڈجسٹمنٹ میکانیزم کو شامل کرکے حکمت عملی کی استحکام اور منافع کو مزید بہتر بنایا جاسکتا ہے۔
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-17 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("EMA Cross Impulsive Strategy", overlay=true, margin_long=100, margin_short=100)
// Parameters
emaLength = input.int(10, title="EMA Length")
impulsiveBodyTicks = input.int(10, title="Minimum Impulsive Candle Body (Ticks)")
rMultiplier = input.int(3, title="Risk Reward Multiplier")
// Calculate EMA
ema10 = ta.ema(close, emaLength)
// Cross conditions
crossUp = ta.crossover(close, ema10)
crossDown = ta.crossunder(close, ema10)
// Impulsive and correction conditions
tickSize = syminfo.mintick
impulsiveBodyMin = impulsiveBodyTicks * tickSize
isImpulsiveBullish = (close > open) and (close - open >= impulsiveBodyMin)
isImpulsiveBearish = (close < open) and (open - close >= impulsiveBodyMin)
isCorrectionBearish = (close < open)
isCorrectionBullish = (close > open)
// Long setup tracking
var int barsSinceLongCross = 0
var bool impulsive1Long = false
var bool correctionLong = false
var bool impulsive2Long = false
if crossUp
barsSinceLongCross := 0
impulsive1Long := false
correctionLong := false
impulsive2Long := false
else
barsSinceLongCross := barsSinceLongCross + 1
if barsSinceLongCross == 1
impulsive1Long := isImpulsiveBullish
if barsSinceLongCross == 2
correctionLong := isCorrectionBearish
if barsSinceLongCross == 3
impulsive2Long := isImpulsiveBullish and (close > math.max(high[1], high[2]))
// Short setup tracking
var int barsSinceShortCross = 0
var bool impulsive1Short = false
var bool correctionShort = false
var bool impulsive2Short = false
if crossDown
barsSinceShortCross := 0
impulsive1Short := false
correctionShort := false
impulsive2Short := false
else
barsSinceShortCross := barsSinceShortCross + 1
if barsSinceShortCross == 1
impulsive1Short := isImpulsiveBearish
if barsSinceShortCross == 2
correctionShort := isCorrectionBullish
if barsSinceShortCross == 3
impulsive2Short := isImpulsiveBearish and (close < math.min(low[1], low[2]))
// Execute trades
if barsSinceLongCross == 3 and impulsive1Long and correctionLong and impulsive2Long
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long", stop=low, profit=close + (close - low) * rMultiplier)
if barsSinceShortCross == 3 and impulsive1Short and correctionShort and impulsive2Short
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short", stop=high, profit=close - (high - close) * rMultiplier)
// Plot EMA
plot(ema10, color=color.blue, title="10 EMA")