
یہ حکمت عملی تیزی اور سست حرکت پذیر اوسط کی کراسنگ کی بنیاد پر مارکیٹ کے رجحانات اور خرید و فروخت کے مقامات کا تعین کرتی ہے۔ جب تیزی سے EMA پر سست EMA کو عبور کرتے ہیں تو مارکیٹ کو بڑھتے ہوئے رجحان میں قرار دیتے ہیں اور خریدنے کا اشارہ دیتے ہیں۔ جب تیزی سے EMA کے نیچے سست EMA کو عبور کرتے ہیں تو مارکیٹ کو گرنے والے رجحان میں قرار دیتے ہیں اور فروخت کا اشارہ دیتے ہیں۔ حکمت عملی خطرے کے انتظام کے لئے اسٹاپ نقصان اور اسٹاپ قیمت بھی طے کرتی ہے۔
اس حکمت عملی میں تیزی سے EMA ((8 دن کی لائن) اور سست EMA ((21 دن کی لائن) کا ایک کراس استعمال کیا جاتا ہے تاکہ مارکیٹ کے رجحانات کا اندازہ لگایا جاسکے۔ اس کی مخصوص منطق یہ ہے:
اس حکمت عملی میں متحرک اشارے اور رجحانات کے تجزیہ کا امتزاج کیا گیا ہے ، جس سے مارکیٹ کی سمت اور الٹ پوائنٹس کو مؤثر طریقے سے پکڑا جاسکتا ہے۔ تیز رفتار ای ایم اے کراسنگ اور ہموار حرکت پذیر اوسط کے ساتھ مل کر ، کچھ شور تجارتی سگنل کو فلٹر کیا جاسکتا ہے۔
اس حکمت عملی کے کچھ اہم فوائد یہ ہیں:
مجموعی طور پر ، اس حکمت عملی میں رجحانات اور متحرک اشارے شامل ہیں ، جو پیرامیٹرز کو ایڈجسٹ کرکے مختلف مارکیٹ کے حالات کے مطابق ڈھال سکتے ہیں ، جو ایک نسبتا flexible لچکدار شارٹ لائن ٹریڈنگ حکمت عملی ہے۔
اس حکمت عملی میں کچھ خطرات بھی ہیں:
ان خطرات کے لیے ہم مندرجہ ذیل طریقوں سے اصلاحات کر سکتے ہیں:
اس حکمت عملی کو بہتر بنانے کے لئے بہت زیادہ جگہ موجود ہے، بنیادی طور پر مندرجہ ذیل سمتوں سے:
ان اصلاحاتی اقدامات سے حکمت عملیوں کی استحکام ، موافقت اور منافع میں نمایاں اضافہ ہوسکتا ہے۔
یہ حکمت عملی مجموعی طور پر ایک ٹرینڈ فالو اور متحرک اشارے کے کراس پر مبنی ایک عام شارٹ لائن ٹریڈنگ حکمت عملی ہے۔ یہ ای ایم اے فاسٹ اور سست لائن کراس اور اسٹاپ نقصان روکنے والے منطق کے ساتھ مل کر مارکیٹ کی سمت کے مواقع کو تیزی سے پکڑ سکتی ہے۔ اس حکمت عملی میں بہت زیادہ اصلاح کی گنجائش ہے۔ اگر مزید معاون اشارے ، خود کار طریقے سے پیرامیٹرز کی اصلاح جیسے دیگر ذرائع کو متعارف کرایا جائے تو اس حکمت عملی کی کارکردگی کو زیادہ مستحکم اور عمدہ بنایا جاسکتا ہے۔ یہ حکمت عملی ان سرمایہ کاروں کے لئے موزوں ہے جو مارکیٹ کو جانتے ہیں اور جو بار بار کام کرنے کو تیار ہیں۔
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TradersPostInc
//@version=5
strategy('TradersPost Example MOMO Strategy', overlay=true)
startTime = input(defval = timestamp('01 Jan 2021 00:00 +0000'), title = 'Start Time', group = 'Date Range')
endTime = input(defval = timestamp('31 Dec 2023 23:59 +0000'), title = 'End Time', group = 'Date Range')
timeCondition = true
timeConditionEnd = timeCondition[1] and not timeCondition
fastEmaLength = input.int(defval = 8, title = 'Fast EMA Length')
slowEmaLength = input.int(defval = 21, title = 'Slow EMA Length')
sides = input.string(defval = 'Both', title = 'Sides', options = ['Long', 'Short', 'Both', 'None'])
fastEma = ta.ema(close, fastEmaLength)
slowEma = ta.ema(close, slowEmaLength)
isUptrend = fastEma >= slowEma
isDowntrend = fastEma <= slowEma
trendChanging = ta.cross(fastEma, slowEma)
ema105 = request.security(syminfo.tickerid, '30', ta.ema(close, 105)[1], barmerge.gaps_off, barmerge.lookahead_on)
ema205 = request.security(syminfo.tickerid, '30', ta.ema(close, 20)[1], barmerge.gaps_off, barmerge.lookahead_on)
plot(ema105, linewidth=4, color=color.new(color.purple, 0), editable=true)
plot(ema205, linewidth=2, color=color.new(color.purple, 0), editable=true)
aa = plot(fastEma, linewidth=3, color=color.new(color.green, 0), editable=true)
bb = plot(slowEma, linewidth=3, color=color.new(color.red, 0), editable=true)
fill(aa, bb, color=isUptrend ? color.green : color.red, transp=90)
tradersPostBuy = trendChanging and isUptrend and timeCondition
tradersPostSell = trendChanging and isDowntrend and timeCondition
pips = syminfo.pointvalue / syminfo.mintick
percentOrPipsInput = input.string('Percent', title='Percent or Pips', options=['Percent', 'Pips'])
stopLossLongInput = input.float(defval=0, step=0.01, title='Stop Loss Long', minval=0)
stopLossShortInput = input.float(defval=0, step=0.01, title='Stop Loss Short', minval=0)
takeProfitLongInput = input.float(defval=0, step=0.01, title='Target Profit Long', minval=0)
takeProfitShortInput = input.float(defval=0, step=0.01, title='Target Profit Short', minval=0)
stopLossPriceLong = ta.valuewhen(tradersPostBuy, close, 0) * (stopLossLongInput / 100) * pips
stopLossPriceShort = ta.valuewhen(tradersPostSell, close, 0) * (stopLossShortInput / 100) * pips
takeProfitPriceLong = ta.valuewhen(tradersPostBuy, close, 0) * (takeProfitLongInput / 100) * pips
takeProfitPriceShort = ta.valuewhen(tradersPostSell, close, 0) * (takeProfitShortInput / 100) * pips
takeProfitALong = takeProfitLongInput > 0 ? takeProfitLongInput : na
takeProfitBLong = takeProfitPriceLong > 0 ? takeProfitPriceLong : na
takeProfitAShort = takeProfitShortInput > 0 ? takeProfitShortInput : na
takeProfitBShort = takeProfitPriceShort > 0 ? takeProfitPriceShort : na
stopLossALong = stopLossLongInput > 0 ? stopLossLongInput : na
stopLossBLong = stopLossPriceLong > 0 ? stopLossPriceLong : na
stopLossAShort = stopLossShortInput > 0 ? stopLossShortInput : na
stopLossBShort = stopLossPriceShort > 0 ? stopLossPriceShort : na
takeProfitLong = percentOrPipsInput == 'Pips' ? takeProfitALong : takeProfitBLong
stopLossLong = percentOrPipsInput == 'Pips' ? stopLossALong : stopLossBLong
takeProfitShort = percentOrPipsInput == 'Pips' ? takeProfitAShort : takeProfitBShort
stopLossShort = percentOrPipsInput == 'Pips' ? stopLossAShort : stopLossBShort
buyAlertMessage = '{"ticker": "' + syminfo.ticker + '", "action": "buy", "price": ' + str.tostring(close) + '}'
sellAlertMessage = '{"ticker": "' + syminfo.ticker + '", "action": "sell", "price": ' + str.tostring(close) + '}'
exitLongAlertMessage = '{"ticker": "' + syminfo.ticker + '", "action": "exit", "price": ' + str.tostring(close) + '}'
exitShortAlertMessage = '{"ticker": "' + syminfo.ticker + '", "action": "exit", "price": ' + str.tostring(close) + '}'
if (sides != "None")
if tradersPostBuy
strategy.entry('Long', strategy.long, when = sides != 'Short', alert_message = buyAlertMessage)
strategy.close('Short', when = sides == "Short" and timeCondition, alert_message = exitShortAlertMessage)
if tradersPostSell
strategy.entry('Short', strategy.short, when = sides != 'Long', alert_message = sellAlertMessage)
strategy.close('Long', when = sides == 'Long', alert_message = exitLongAlertMessage)
exitAlertMessage = '{"ticker": "' + syminfo.ticker + '", "action": "exit"}'
strategy.exit('Exit Long', from_entry = "Long", profit = takeProfitLong, loss = stopLossLong, alert_message = exitAlertMessage)
strategy.exit('Exit Short', from_entry = "Short", profit = takeProfitShort, loss = stopLossShort, alert_message = exitAlertMessage)
strategy.close_all(when = timeConditionEnd)