মাল্টি-টাইম পিরিয়ড ডাইনামিক স্টপ লস 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-চক্রের ইএমএর মাধ্যমে বাজারের প্রবণতার দিকনির্দেশনা নির্ধারণ করে। দ্বিতীয়ত, বাজারের চাপ এবং সম্ভাব্য ব্রেকথ্রুগুলি সনাক্ত করার জন্য উন্নত সংস্করণে স্কিউজ মোমেন্টাম সূচক ব্যবহার করে, যা লাইন রিটার্ন পদ্ধতির মাধ্যমে মূল্য বিচ্যুতি গণনা করে। অবশেষে, ট্রেডিংয়ের দিকনির্দেশনা নিশ্চিত করার জন্য উন্নত ক্যাপিটাল ফ্লো ইন্ডিকেটর (সিএমএফ) ব্যবহার করে, যাতে নিশ্চিত করা যায় যে পর্যাপ্ত তহবিল রয়েছে দামের চলাচলকে সমর্থন করার জন্য। কৌশলটি একটি গতিশীল স্টপ লস সেট করে এবং স্টপ লস সংকেতটি নিশ্চিত হওয়ার পরে স্বয়ংক্রিয়ভাবে মুনাফা বাড়ানোর সাথে সাথে সামঞ্জস্য করে। এই পদ্ধতিটি উভয়ই মুনাফা রক্ষা করে এবং দামকে পর্যাপ্ত পরিমাণে ওঠাল দেয়।

কৌশলগত সুবিধা

  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")