
یہ حکمت عملی دو مختلف ادوار کی اشاریہ حرکت پذیری اوسط ((EMA) کے کراس کو بطور تجارتی سگنل استعمال کرتی ہے ، اور ایک مقررہ تعداد میں اسٹاپ اور اسٹاپ نقصانات کا تعین کرتی ہے۔ جب قلیل مدتی EMA نیچے سے اوپر کی طرف سے طویل مدتی EMA کو عبور کرتا ہے تو ، زیادہ پوزیشن کھولی جاتی ہے۔ جب قلیل مدتی EMA اوپر سے نیچے کی طرف سے طویل مدتی EMA کو عبور کرتا ہے تو ، پوزیشن خالی کردی جاتی ہے۔ جب تجارت ہوتی ہے تو ، خطرے کو کنٹرول کرنے اور منافع کو مقفل کرنے کے لئے مقررہ تعداد میں اسٹاپ اور اسٹاپ نقصانات کا تعین کیا جاتا ہے۔
ڈبل مساوی کراس اسٹاپ نقصان کی حکمت عملی ایک آسان اور استعمال میں آسان تجارتی حکمت عملی ہے ، جو EMA کراسنگ کے ذریعے تجارتی سگنل پیدا کرتی ہے ، جبکہ اسٹریپ نقصان کو روکنے کے لئے مقررہ پوائنٹس کی تعداد بھی رکھتی ہے۔ اس حکمت عملی کا فائدہ یہ ہے کہ یہ منطقی طور پر واضح ہے ، اس پر عمل درآمد کرنا آسان ہے ، اور مارکیٹ کے رجحانات کو بہتر طور پر پکڑ سکتا ہے۔ لیکن اس کے ساتھ ہی ، جعلی سگنل ، رجحان کی تاخیر ، مارکیٹ اور فکسڈ اسٹاپ جیسے خطرات بھی موجود ہیں۔ اصلاح کی سمت میں مزید اشارے کی اصلاح کے پیرامیٹرز ، متحرک نقصانات ، پوزیشن مینجمنٹ اور فلٹرز میں اضافہ شامل ہے۔ تاجر اپنی خطرے کی ترجیحات اور مارکیٹ کی خصوصیات کے مطابق ، حکمت عملی کی استحکام اور منافع بخش صلاحیت کو بہتر بنانے کے لئے اس حکمت عملی کو مناسب طریقے سے بہتر اور ایڈجسٹ کرسکتا ہے۔
/*backtest
start: 2024-05-01 00:00:00
end: 2024-05-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("EMA5 Cross EAM200 && SL/TP 50 and 200 Point Target", overlay=true)
// Define input parameters for EMA lengths
ema_5 = input.int(5, title="Fast EMA Length")
ema_200 = input.int(200, title="Slow EMA Length")
// Define input parameters for stop loss and profit target in points
stopLossPoints = input.float(50, title="Stop Loss (Points)")
profitTargetPoints = input.float(200, title="Profit Target (Points)")
// Calculate EMAs
price = close
emafast = ta.ema(price, ema_5)
emaslow = ta.ema(price, ema_200)
// Plot EMAs on chart
plot(emafast, title="5-period EMA", color=color.black)
plot(emaslow, title="200-period EMA", color=color.blue)
// Extra lines if needed
ema_13 = input.int(13, title="13 EMA")
ema_13_line = ta.ema(price, ema_13)
plot(ema_13_line, title="13-period EMA", color=color.rgb(156, 39, 176, 90))
ema_20 = input.int(20, title="20 EMA")
ema_20_line = ta.ema(price, ema_20)
plot(ema_20_line, title="20-period EMA", color=color.red)
// Define entry conditions
longCondition = ta.crossover(emafast, emaslow)
shortCondition = ta.crossunder(emafast, emaslow)
// Counter to keep track of the number of bars since the entry
var int barCount = na
// Reset counter and enter long trade
if (longCondition)
strategy.entry("Long", strategy.long, comment="Long")
barCount := 0
// Reset counter and enter short trade
if (shortCondition)
strategy.entry("Short", strategy.short, comment="Short")
barCount := 0
// Increment counter if in trade
if (strategy.opentrades > 0)
barCount += 1
// Calculate entry price
entryPrice = strategy.position_avg_price
// Exit long trade if stop loss, profit target hit, or 200 points have been reached
if (strategy.position_size > 0)
strategy.exit("Take Profit/Stop Loss", "Long", stop=entryPrice - stopLossPoints, limit=entryPrice + profitTargetPoints)
// Exit short trade if stop loss, profit target hit, or 200 points have been reached
if (strategy.position_size < 0)
strategy.exit("Take Profit/Stop Loss", "Short", stop=entryPrice + stopLossPoints, limit=entryPrice - profitTargetPoints)