ملٹی ٹائم فریم ڈائنامک اسٹاپ نقصان EMA-Squeeze تجارتی حکمت عملی

EMA SQM CMF KC SL TP MTF
تخلیق کی تاریخ: 2024-12-11 15:50:38 آخر میں ترمیم کریں: 2024-12-11 15:50:38
کاپی: 0 کلکس کی تعداد: 435
1
پر توجہ دیں
1617
پیروکار

ملٹی ٹائم فریم ڈائنامک اسٹاپ نقصان EMA-Squeeze تجارتی حکمت عملی

جائزہ

یہ حکمت عملی ایک متحرک تجارتی نظام ہے جو ایک سے زیادہ ٹائم سائیکل تجزیہ پر مبنی ہے ، جس میں اشاریہ حرکت پذیری اوسط ((EMA) ، سکسیج متحرک اشارے ((SQM) اور کیپٹل فلو اشارے ((CMF) کے ساتھ تجارتی سگنل تیار کیے جاتے ہیں۔ اس حکمت عملی کا بنیادی مقصد رجحانات کی تصدیق کرنا ہے جس میں متعدد ٹائم فریموں کا تجزیہ کیا جاتا ہے ، اور متحرک اسٹاپ نقصانات کا استعمال کرتے ہوئے خطرہ کے انتظام کو بہتر بنانا ہے۔ اس حکمت عملی میں خود کار طریقے سے اسٹاپ نقصانات اور منافع بخش پروگرام کا استعمال کیا گیا ہے ، جو مارکیٹ میں اتار چڑھاؤ کے مطابق خود کار طریقے سے تجارتی پیرامیٹرز کو ایڈجسٹ کرسکتا ہے۔

حکمت عملی کا اصول

اس حکمت عملی میں ٹریڈنگ کے مواقع کی نشاندہی کرنے کے لئے تین اہم تکنیکی اشارے کا مجموعہ استعمال کیا گیا ہے۔ پہلے ، مارکیٹ کے رجحانات کی سمت کا تعین کرنے کے لئے 11 اور 34 دوروں کے ای ایم اے کا استعمال کیا گیا ہے۔ دوسرا ، مارکیٹ کے دباؤ اور ممکنہ توڑ کے مواقع کا پتہ لگانے کے لئے ایک بہتر ورژن کا استعمال کیا گیا ہے۔ یہ اشارے لکیری رجعت کے طریقہ کار کے ذریعہ قیمت کے انحراف کا حساب لگاتا ہے۔ آخر میں ، تجارت کی سمت کی تصدیق کرنے کے لئے بہتر کیش فلو اشارے ((CMF) کا استعمال کرتے ہوئے ، اس بات کا یقین کرنے کے لئے کہ قیمت کی نقل و حرکت کی حمایت کرنے کے لئے کافی رقم موجود ہے۔ حکمت عملی کے اشارے کی تصدیق کے بعد ، متحرک اسٹاپ نقصان کا تعین کیا جاتا ہے ، اور اسٹاپ نقصان خود بخود منافع میں اضافے کے ساتھ ایڈجسٹ ہوجاتا ہے ، یہ طریقہ کار منافع کو بچانے کے لئے تیار ہے اور قیمتوں میں اتار چڑھاؤ کے لئے کافی گنجائش فراہم کرتا ہے۔

اسٹریٹجک فوائد

  1. کثیر جہتی سگنل کی تصدیق: متعدد تکنیکی اشارے اور وقت کی مدت کے تجزیے کے ساتھ مل کر ، جعلی سگنل کے خطرے کو نمایاں طور پر کم کیا گیا ہے۔
  2. انٹیلجنٹ رسک مینجمنٹ: متحرک اسٹاپ نقصان کا نظام مارکیٹ میں اتار چڑھاؤ کے مطابق خود بخود ایڈجسٹ کرسکتا ہے ، منافع کی حفاظت کے ساتھ ساتھ جلد بازی سے بچنے سے بچتا ہے۔
  3. خود کو اپنانے کی صلاحیت: حکمت عملی کے پیرامیٹرز کو مختلف مارکیٹ کے حالات کے مطابق ایڈجسٹ کیا جاسکتا ہے ، جس میں اچھی موافقت ہے۔
  4. مکمل ٹریڈنگ بند لوپ: انٹری سگنل سے لے کر آؤٹ مینجمنٹ تک واضح قواعد موجود ہیں ، جس سے موضوعی فیصلے کا اثر کم ہوتا ہے۔
  5. فنڈز کے بہاؤ کی تصدیق: فنڈز کے بہاؤ کی نگرانی کے ذریعے قیمتوں کی نقل و حرکت کی توثیق ، تجارت کی وشوسنییتا کو بہتر بناتا ہے۔

اسٹریٹجک رسک

  1. پیرامیٹر حساسیت: متعدد تکنیکی اشارے کے پیرامیٹرز کی ترتیب کو محتاط اصلاح کی ضرورت ہے ، اور غلط پیرامیٹرز کی وجہ سے کارکردگی میں کمی واقع ہوسکتی ہے۔
  2. مارکیٹ کے ماحول پر انحصار: شدید اتار چڑھاؤ یا کم لیکویڈیٹی والے مارکیٹ کے ماحول میں ، سگنل کے معیار پر اثر پڑ سکتا ہے۔
  3. حساب کی پیچیدگی: ایک سے زیادہ وقت کی مدت کے حساب سے سگنل کی تاخیر کا سبب بن سکتا ہے ، جس سے اصل تجارت کی تاثیر متاثر ہوتی ہے۔
  4. اسٹاپ لوڈ ایڈجسٹمنٹ کا خطرہ: متحرک اسٹاپ لوڈ کچھ مارکیٹ کے حالات کے تحت بہت زیادہ شدت پسند یا قدامت پسند ہوسکتا ہے۔
  5. فنڈ مینجمنٹ کی ضروریات: حکمت عملی کو خطرات اور فوائد کو متوازن کرنے کے لئے مناسب فنڈ مینجمنٹ کی ضرورت ہوتی ہے۔

حکمت عملی کی اصلاح کی سمت

  1. اتار چڑھاؤ کی شرح کو اپنانے کا تعارف: اے ٹی آر یا دیگر اتار چڑھاؤ کے اشارے کے مطابق پیرامیٹرز کو متحرک طور پر ایڈجسٹ کیا جاسکتا ہے ، جس سے حکمت عملی کی موافقت میں اضافہ ہوتا ہے۔
  2. بہتر سگنل فلٹرنگ: سگنل کے معیار کو بہتر بنانے کے لئے حجم وزن یا ٹائم فلٹر شامل کیا جاسکتا ہے۔
  3. نقصان کی روک تھام کے طریقہ کار کو بہتر بنائیں: معاونت اور مزاحمت کے مقامات کے ساتھ مل کر نقصان کی روک تھام کے مقامات کی ترتیبات کو بہتر بنایا جاسکتا ہے۔
  4. مارکیٹ کے ماحول کا تجزیہ شامل کریں: مارکیٹ کے رجحان کی طاقت کے اشارے متعارف کروائیں ، مختلف مارکیٹ کے ماحول میں مختلف پیرامیٹرز کی ترتیبات استعمال کریں۔
  5. فنڈ مینجمنٹ کو بہتر بنائیں: پوزیشن مینجمنٹ الگورتھم متعارف کروائیں ، سگنل کی طاقت اور مارکیٹ میں اتار چڑھاؤ کے مطابق پوزیشن تناسب کو ایڈجسٹ کریں۔

خلاصہ کریں۔

اس حکمت عملی میں کثیر جہتی تکنیکی تجزیہ اور ذہین رسک مینجمنٹ کے ذریعہ ، تاجر کو ایک منظم تجارتی پروگرام فراہم کیا گیا ہے۔ اس کی بنیادی خوبی یہ ہے کہ اس میں رجحانات کی پیروی اور متحرک رسک مینجمنٹ کا امتزاج کیا گیا ہے ، جو منافع کی حفاظت کے ساتھ ساتھ مارکیٹ کے مواقع کو پکڑنے کے قابل ہے۔ اگرچہ حکمت عملی کے کچھ پہلو ہیں جن کو بہتر بنانے کی ضرورت ہے ، لیکن معقول پیرامیٹرز کی ترتیب اور رسک کنٹرول کے ذریعہ ، یہ اب بھی ایک موثر تجارتی آلہ کے طور پر کام کرسکتا ہے۔ یہ تجویز کیا گیا ہے کہ تاجر کو عملی استعمال سے پہلے کافی آراء اور پیرامیٹرز کی عددی اصلاح کی جائے ، اور مارکیٹ کے تجربے کے ساتھ مل کر تجارتی نظام کو آہستہ آہستہ بہتر بنایا جائے۔

حکمت عملی کا ماخذ کوڈ
/*backtest
start: 2024-11-10 00:00:00
end: 2024-12-09 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("LL Crypto - SUI", overlay=true)

// Parâmetros de tempo para criptomoedas
fast_ema_len = input.int(11, minval=5, title="Fast EMA")
slow_ema_len = input.int(34, minval=20, title="Slow EMA")
sqm_lengthKC = input.int(20, title="SQM KC Length")
kauf_period = input.int(20, title="Kauf Period")
kauf_mult = input.float(2, title="Kauf Mult factor")
min_profit_sl = input.float(5, minval=0.01, maxval=100.0, title="Min profit to start moving SL [%]")
longest_sl = input.float(10, minval=0.01, maxval=100.0, title="Maximum possible of SL [%]")
sl_step = input.float(0.5, minval=0.0, maxval=1.0, title="Take profit factor")

// Parâmetros adaptados para criptomoedas
CMF_length = input.int(11, minval=1, title="CMF length")
show_plots = input.bool(true, title="Show plots")

// Definir intervalos de tempo para criptomoedas
selected_timeframe = input.string(defval="15", title="Intervalo de Tempo", options=["1", "15", "60"])

lower_resolution = timeframe.period == '1' ? '1' :
                   timeframe.period == '5' ? '15' :
                   timeframe.period == '15' ? '60' :
                   timeframe.period == '60' ? '240' :
                   timeframe.period == '240' ? 'D' :
                   timeframe.period == 'D' ? 'W' : 'M'

sp_close = close[barstate.isrealtime ? 1 : 0]
sp_high = high[barstate.isrealtime ? 1 : 0]
sp_low = low[barstate.isrealtime ? 1 : 0]
sp_volume = volume[barstate.isrealtime ? 1 : 0]

// Calcular Squeeze Momentum ajustado para criptomoedas
sqm_val = ta.linreg(sp_close - math.avg(math.avg(ta.highest(sp_high, sqm_lengthKC), ta.lowest(sp_low, sqm_lengthKC)), ta.sma(sp_close, sqm_lengthKC)), sqm_lengthKC, 0)
close_low = request.security(syminfo.tickerid, lower_resolution, sp_close, lookahead=barmerge.lookahead_on)
high_low = request.security(syminfo.tickerid, lower_resolution, sp_high, lookahead=barmerge.lookahead_on)
low_low = request.security(syminfo.tickerid, lower_resolution, sp_low, lookahead=barmerge.lookahead_on)
sqm_val_low = ta.linreg(close_low - math.avg(math.avg(ta.highest(high_low, sqm_lengthKC), ta.lowest(low_low, sqm_lengthKC)), ta.sma(close_low, sqm_lengthKC)), sqm_lengthKC, 0)

// CMF adaptado para criptomoedas
ad = sp_close == sp_high and sp_close == sp_low or sp_high == sp_low ? 0 : ((2 * sp_close - sp_low - sp_high) / (sp_high - sp_low)) * sp_volume
money_flow = math.sum(ad, CMF_length) / math.sum(sp_volume, CMF_length)

// Condições de entrada para criptomoedas
low_condition_long = (sqm_val_low > sqm_val_low[1])
low_condition_short = (sqm_val_low < sqm_val_low[1])
money_flow_min = (money_flow[4] > money_flow[2]) and (money_flow[3] > money_flow[2]) and (money_flow[2] < money_flow[1]) and (money_flow[2] < money_flow)
money_flow_max = (money_flow[4] < money_flow[2]) and (money_flow[3] < money_flow[2]) and (money_flow[2] > money_flow[1]) and (money_flow[2] > money_flow)
condition_long = ((sqm_val > sqm_val[1])) and money_flow_min and ta.lowest(sqm_val, 5) < 0
condition_short = ((sqm_val < sqm_val[1])) and money_flow_max and ta.highest(sqm_val, 5) > 0
enter_long = low_condition_long and condition_long
enter_short = low_condition_short and condition_short

// Stop conditions
var float current_target_price = na
var float current_sl_price = na
var float current_target_per = na
var float current_profit_per = na

set_targets(isLong, min_profit, current_target_per, current_profit_per) =>
    float target = na
    float sl = na
    if isLong
        target := sp_close * (1.0 + current_target_per)
        sl := sp_close * (1.0 - (longest_sl / 100.0))
    else
        target := sp_close * (1.0 - current_target_per)
        sl := sp_close * (1.0 + (longest_sl / 100.0))
    [target, sl]

target_reached(isLong, min_profit, current_target_per, current_profit_per) =>
    float target = na
    float sl = na
    float profit_per = na
    float target_per = na
    if current_profit_per == na
        profit_per := (min_profit * sl_step) / 100.0
    else
        profit_per := current_profit_per + ((min_profit * sl_step) / 100.0)
    target_per := current_target_per + (min_profit / 100.0)
    if isLong
        target := strategy.position_avg_price * (1.0 + target_per)
        sl := strategy.position_avg_price * (1.0 + profit_per)
    else
        target := strategy.position_avg_price * (1.0 - target_per)
        sl := strategy.position_avg_price * (1.0 - profit_per)
    [target, sl, profit_per, target_per]

hl_diff = ta.sma(sp_high - sp_low, kauf_period)
stop_condition_long = 0.0
new_stop_condition_long = sp_low - (hl_diff * kauf_mult)
if (strategy.position_size > 0)
    if (sp_close > current_target_price)
        [target, sl, profit_per, target_per] = target_reached(true, min_profit_sl, current_target_per, current_profit_per)
        current_target_price := target
        current_sl_price := sl
        current_profit_per := profit_per
        current_target_per := target_per
    stop_condition_long := math.max(stop_condition_long[1], current_sl_price)
else
    stop_condition_long := new_stop_condition_long

stop_condition_short = 99999999.9
new_stop_condition_short = sp_high + (hl_diff * kauf_mult)
if (strategy.position_size < 0)
    if (sp_close < current_target_price)
        [target, sl, profit_per, target_per] = target_reached(false, min_profit_sl, current_target_per, current_profit_per)
        current_target_price := target
        current_sl_price := sl
        current_profit_per := profit_per
        current_target_per := target_per
    stop_condition_short := math.min(stop_condition_short[1], current_sl_price)
else
    stop_condition_short := new_stop_condition_short

// Submit entry orders
if (enter_long and (strategy.position_size <= 0))
    if (strategy.position_size < 0)
        strategy.close(id="SHORT")
    current_target_per := (min_profit_sl / 100.0)
    current_profit_per := na
    [target, sl] = set_targets(true, min_profit_sl, current_target_per, current_profit_per)
    current_target_price := target
    current_sl_price := sl
    strategy.entry(id="LONG", direction=strategy.long)

    if show_plots
        label.new(bar_index, sp_high, text="LONG\nSL: " + str.tostring(stop_condition_long), style=label.style_label_down, color=color.green)





if (enter_short and (strategy.position_size >= 0))
    if (strategy.position_size > 0)
        strategy.close(id="LONG")
    current_target_per := (min_profit_sl / 100.0)
    current_profit_per := na
    [target, sl] = set_targets(false, min_profit_sl, current_target_per, current_profit_per)
    current_target_price := target
    current_sl_price := sl
    strategy.entry(id="SHORT", direction=strategy.short)
    if show_plots
        label.new(bar_index, sp_high, text="SHORT\nSL: " + str.tostring(stop_condition_short), style=label.style_label_down, color=color.red)

if (strategy.position_size > 0)
    strategy.exit(id="EXIT LONG", stop=stop_condition_long)

if (strategy.position_size < 0)
    strategy.exit(id="EXIT SHORT", stop=stop_condition_short)

// Plot anchor trend
plotshape(low_condition_long, style=shape.triangleup, location=location.abovebar, color=color.green)
plotshape(low_condition_short, style=shape.triangledown, location=location.abovebar, color=color.red)

plotshape(condition_long, style=shape.triangleup, location=location.belowbar, color=color.green)
plotshape(condition_short, style=shape.triangledown, location=location.belowbar, color=color.red)

plotshape(enter_long, style=shape.triangleup, location=location.bottom, color=color.green)
plotshape(enter_short, style=shape.triangledown, location=location.bottom, color=color.red)

// Plot emas
plot(ta.ema(close, 20), color=color.blue, title="20 EMA")
plot(ta.ema(close, 50), color=color.orange, title="50 EMA")
plot(ta.sma(close, 200), color=color.red, title="MA 200")

// Plot stop loss values for confirmation
plot(series=(strategy.position_size > 0) and show_plots ? stop_condition_long : na, color=color.green, style=plot.style_linebr, title="Long Stop")
plot(series=(strategy.position_size < 0) and show_plots ? stop_condition_short : na, color=color.green, style=plot.style_linebr, title="Short Stop")
plot(series=(strategy.position_size < 0) and show_plots ? current_target_price : na, color=color.yellow, style=plot.style_linebr, title="Short TP")
plot(series=(strategy.position_size > 0) and show_plots ? current_target_price : na, color=color.yellow, style=plot.style_linebr, title="Long TP")