
ডুয়াল মুভিং এভারেজ ক্রসওভার ট্রেন্ড কৌশল হল একটি ট্রেন্ড ট্র্যাকিং কৌশল যা দ্রুত চলমান গড় এবং ধীর চলমান গড়ের ক্রস ব্যবহার করে একটি ক্রয়-বিক্রয় সংকেত গঠন করে। এই কৌশলটি একই সাথে একাধিক সূচক যেমন এমএসিডি, আরএসআই এবং আরও অনেক কিছুকে ট্রেন্ডের দিকনির্দেশের জন্য সংযুক্ত করে।
এই কৌশলটি মূলত নিম্নলিখিত সূচকগুলির উপর ভিত্তি করে নির্ণয় করা হয়ঃ
দ্রুত চলমান গড় এবং ধীর চলমান গড়: দ্রুত লাইনে ধীর লাইন দিয়ে ক্রয় সংকেত, দ্রুত লাইনের নীচে ধীর লাইন দিয়ে বিক্রয় সংকেত।
MACD: যখন MACD লাইন Signal লাইনের উপরে থাকে এবং MACD এর সর্বনিম্ন মান বৃদ্ধি পায় তখন মাল্টি-হেড সিগন্যাল।
আরএসআইঃ আরএসআই ৫০ এর উপরে মাল্টিহেড সংকেত এবং ৫০ এর নীচে খালি হেড সংকেত।
পরিমাপকারী দোলক (এও): যখন এও-র উপরে 0-অক্ষটি ক্রয় সংকেত হিসাবে এবং এও-র নীচে 0-অক্ষটি বিক্রয় সংকেত হিসাবে।
সূর্যের স্তরের তিনটি চলমান গড়ঃ সূর্যের স্তরের স্বল্প-চক্রের চলমান গড়ের উপর দীর্ঘ-চক্রের চলমান গড়টি কেনার সংকেত দেয়।
এই কৌশলটি একাধিক সময়কাল এবং একাধিক সূচককে একত্রিত করে ক্রয় এবং বিক্রয় সিদ্ধান্তের যুক্তি গঠন করে। একাধিক সূচক যখন একসাথে ক্রয় সংকেত দেয় তখন ক্রয় নির্দেশ জারি করে এবং যখন একাধিক সূচক একই সাথে বিক্রয় সংকেত দেয় তখন বিক্রয় নির্দেশ জারি করে, প্রবণতা অনুসরণ করে।
এই কৌশলটির বেশ কিছু সুবিধা রয়েছেঃ
মাল্টি-ইনডিকেটর প্যাকেজ বিচার, ভুল সংকেত এড়ানো, বিচার নির্ভুলতা বৃদ্ধি
বিভিন্ন সময়সীমার উপর ভিত্তি করে, এটি বৃহত্তর স্তরের প্রবণতার দিকনির্দেশনা সনাক্ত করতে পারে।
সূচক প্যারামিটারগুলি অনুকূলিতকরণ করা হয়েছে, প্যারামিটার টিউনিং, ভাল রিটার্নের হার রয়েছে।
ঝুঁকি নিয়ন্ত্রণের জন্য মোবাইল স্টপ ব্যবহার করুন এবং ক্ষতির বিস্তার রোধ করুন।
স্বয়ংক্রিয় ট্রেন্ড ট্র্যাকিং, কোন মানুষের হস্তক্ষেপ প্রয়োজন, অপারেশন খরচ কমানো।
এই কৌশলটির কিছু ঝুঁকিও রয়েছেঃ
অস্থির পরিস্থিতিতে অনেকগুলি অকার্যকর ট্রেডিং সিগন্যাল তৈরি হতে পারে। সূচক প্যারামিটারগুলি অপ্টিমাইজ করে অকার্যকর সংকেত হ্রাস করা যেতে পারে।
অপ্রত্যাশিত ঘটনা দ্রুত প্রত্যাহারের কারণ হতে পারে। ক্ষতি নিয়ন্ত্রণের জন্য মোবাইল স্টপ ক্ষতি সেট করা যেতে পারে।
মাল্টি স্পেস সিগন্যাল নির্ধারণের নিয়মগুলি জটিল, এবং প্যারামিটার অপ্টিমাইজেশনের জন্য প্রচুর পরিমাণে ঐতিহাসিক ডেটা সমর্থন প্রয়োজন।
ভুল ট্র্যাকিং স্টপ সেটিংগুলি অকালে স্টপ হতে পারে। সর্বোত্তম প্যারামিটারগুলি নির্ধারণ করতে পুনরাবৃত্তিমূলক পরীক্ষার প্রয়োজন।
এই কৌশলটি নিম্নলিখিত দিকগুলি থেকে অপ্টিমাইজ করা যেতে পারেঃ
আরও স্থিতিশীল এবং সুনির্দিষ্ট ট্রেডিং সিগন্যালের জন্য আরও সূচকগুলির সমন্বয় পরীক্ষা করুন। যেমন অস্থিরতা হার সূচক, ওবিভি সূচক ইত্যাদি।
ইন্ডিকেটর প্যারামিটার অপ্টিমাইজ করুন, অসফল লেনদেনের সংখ্যা হ্রাস করুন। মেশিন লার্নিং এবং জেনেটিক অ্যালগরিদম ব্যবহার করে স্বয়ংক্রিয়ভাবে অনুকূল প্যারামিটারগুলি সন্ধান করুন।
মডেল ইন্টিগ্রেশন প্রযুক্তি যুক্ত করুন, আরও স্বাধীন কৌশলগত মডেলের বিচার ফলাফলকে একীভূত করুন। স্থিতিশীলতা বাড়ান।
উচ্চ ফ্রিকোয়েন্সি স্তরে প্রবেশ করুন, নিম্ন ফ্রিকোয়েন্সি স্তরে প্রস্থান করুন।
বায়ু নিয়ন্ত্রণ মডিউল, একক স্টপ লস অনুপাত, সর্বোচ্চ প্রত্যাহার অনুপাত, ইত্যাদি।
গতিশীল গড় দ্বি-পরিদর্শক ক্রস-মাল্টি-ফ্যান কৌশলটি দ্রুত চলমান গড় এবং ধীর চলমান গড়ের ক্রস দ্বারা লেনদেনের সংকেত তৈরি করে এবং ম্যাকড, আরএসআই ইত্যাদির মতো একাধিক সূচকের সাথে ট্রেন্ডের দিকনির্দেশনা নির্ধারণ করে, স্বয়ংক্রিয় ট্রেন্ড ট্র্যাকিংয়ের জন্য। এই কৌশলটি অপ্টিমাইজ করার জন্য আরও জায়গা রয়েছে। আরও সূচক, প্যারামিটার সামঞ্জস্য এবং মডেল ইন্টিগ্রেশন ইত্যাদির মাধ্যমে আরও ভাল কৌশলগত প্রভাব পাওয়ার আশা করা যায়।
/*backtest
start: 2023-10-22 00:00:00
end: 2023-11-21 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy('SteffVans', shorttitle='SteffVans strategy', overlay=true, process_orders_on_close = true)
// Input settings
macd_fast_length = input(12)
macd_slow_length = input(26)
macd_signal_length = input(9)
// Calculate MACD values
[macd_line, signal_line, _] = ta.macd(close, macd_fast_length, macd_slow_length, macd_signal_length)
mg = ta.lowest(signal_line, 30) >= -0
// RSI
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
rsiLengthInput = input.int(14, minval=1)
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
maTypeInput = input.string("SMA", title="MA Type", options=["SMA", "Bollinger Bands", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group="MA Settings")
maLengthInput = input.int(14, title="MA Length", group="MA Settings")
bbMultInput = input.float(2.0, minval=0.001, maxval=50, title="BB StdDev", group="MA Settings")
up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput)
down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput)
RSI = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
// AO
AO = ta.sma((high + low) / 2, 5) - ta.sma((high + low) / 2, 34)
crossaosell = AO < AO[1] and AO[1] < AO[2] and AO[2] > AO[3] and ta.lowest(low,3)
// Uptrend sma
len1 = input.int(5, minval=1)
len2 = input.int(10, minval=1)
len3 = input.int(20, minval=1)
src = input(close)
out1 = ta.sma(src, len1)
out2 = ta.sma(src, len2)
out3 = ta.sma(src, len3)
// Timeframe
macdl60 = request.security(syminfo.tickerid, "60", signal_line,lookahead = barmerge.lookahead_on)
ao = request.security(syminfo.tickerid, "60", AO,lookahead = barmerge.lookahead_on)
rsi = request.security(syminfo.tickerid, "60", RSI,lookahead = barmerge.lookahead_on)
good = request.security(syminfo.tickerid, "60", mg,lookahead = barmerge.lookahead_on)
bad = request.security(syminfo.tickerid, "60", crossaosell,lookahead = barmerge.lookahead_on)
ma1 = request.security(syminfo.tickerid, "D", out1,lookahead = barmerge.lookahead_on)
ma2 = request.security(syminfo.tickerid, "D", out2, lookahead = barmerge.lookahead_on)
ma3 = request.security(syminfo.tickerid, "D", out3, lookahead = barmerge.lookahead_on)
// Kriteria BUY and SELL
uptrend1 = request.security(syminfo.tickerid, "D", close,lookahead = barmerge.lookahead_on) > ma1 and ma1 > ma3 and ma2 > ma3
uptrend2 = ta.lowest(ma1,12) > ta.lowest(ma3,12) and ta.lowest(ma2,12) > ta.lowest(ma3,12)
// Triger BUY and SELL
cross1 = ao > ao[1] and ao[1] < ao[2] and ao > 0 and good and rsi >= 60 and uptrend1
cross2 = ao > 0 and ao[1] < 0 and good and rsi >=50 and uptrend1
cross3 = ao > 0 and ao[1] < 0 and not good and uptrend2 and uptrend1
cross4 = ao > ao[1] and ao[1] > ao[2] and ao[2] < ao[3] and ao[3] < ao[4] and not good and uptrend2 and uptrend1
s1 = ao < ao[1] and ao[1] < ao[2] and ao[2] < ao[3] and ao > 0 and rsi < 50 and request.security(syminfo.tickerid, "D", close,lookahead = barmerge.lookahead_on) < ma1
s2 = ao < 0 and ao < ao[2] and rsi < 50 and request.security(syminfo.tickerid, "D", close,lookahead = barmerge.lookahead_on) < ma1
// Variabel Buy dan Sell
buySignal = false
sellSignal = false
// Syarat masuk Buy
buyCondition = cross1 or cross2 or cross3 or cross4
if buyCondition
buySignal := true
// Syarat masuk Sell
sellCondition = s1 or s2
if sellCondition
sellSignal := true
// Reset sinyal jika ada sinyal berulang
if buySignal and sellSignal
sellSignal := false
if sellSignal and buySignal
buySignal := false
// Logika perdagangan
if buySignal
strategy.entry("Buy", strategy.long, comment = "BUY")
if sellSignal
strategy.close("Buy")
plotshape(cross1,title = "Stefkuy1", style = shape.labelup, location = location.belowbar, color = color.green,text = "1", textcolor = color.white,size = size.small)
plotshape(cross2,title = "Stefkuy2", style = shape.labelup, location = location.belowbar, color = color.green, text = "2", textcolor= color.white, size = size.small)
plotshape(cross3,title = "StefVan1", style = shape.labelup, location = location.belowbar, color = color.rgb(0, 153, 255), text = "3", textcolor= color.white,size = size.small)
plotshape(cross4,title = "StefVan2", style = shape.labelup, location = location.belowbar, color = color.rgb(0, 153, 255), text = "4", textcolor= color.white,size = size.small)