ম্যাকডি মাল্টি ইন্ডিকেটর ট্রেন্ড অনুসরণকারী কৌশল

লেখক:চাওঝাং, তারিখ: ২০২৩-০৯-১৪ ১৮ঃ০৯ঃ৫৭
ট্যাগঃ

কৌশলগত যুক্তি

এই কৌশলটি ম্যাকডি, চলমান গড়, কুমির এবং আরও অনেক কিছুকে একত্রিত করে ট্রেন্ড অনুসরণ করার জন্য ট্রেন্ডের দিকনির্দেশনা নির্ধারণ করে।

এর যুক্তি হচ্ছে:

  1. ম্যাকডি সংক্ষিপ্ত, দীর্ঘ এবং হিস্টোগ্রাম লাইন গণনা করুন

  2. স্বল্পমেয়াদী প্রবণতা নির্ধারণের জন্য হিস্টোগ্রাম দিক ব্যবহার করুন

  3. মূল্য অবস্থান পরিমাপ করার জন্য একাধিক চলমান গড় গ্রাফ করুন

  4. কুমির রেখা সামগ্রিক প্রবণতা শক্তি বিচার

  5. উপরের সূচকগুলি একত্রিত করে, সমন্বয় করা হলে দীর্ঘ / সংক্ষিপ্ত যান

  6. স্টপ লস যখন সূচকগুলি প্রাথমিক বিপরীতের জন্য ফ্লিপ করে

একাধিক সূচককে সংকলন করে, এটি শক্তিশালী প্রবণতা বাণিজ্য করার লক্ষ্য রাখে এবং বিপরীতমুখী ঘটনা ঘটলে প্রাথমিকভাবে ক্ষতি কমাতে পারে।

সুবিধা

  • এমএসিডি স্বল্পমেয়াদী প্রবণতা এবং শক্তি বিচার করে

  • এমএ পজিশনগুলি মাঝারি থেকে দীর্ঘমেয়াদী প্রবণতা নির্ধারণ করে

  • কুমির সামগ্রিক প্রবণতা শক্তি দেখায়

  • একাধিক সূচক সঠিকতা উন্নত করে

ঝুঁকি

  • ব্যাপক প্যারামিটার অপ্টিমাইজেশান প্রয়োজন

  • বিরোধী সংকেত ব্যাখ্যা করা কঠিন

  • এমএ ইত্যাদির সাথে বিলম্বিত সমস্যা

সংক্ষিপ্তসার

এই কৌশলটি একাধিক সূচক ব্যবহার করে প্রবণতার দিকটি ব্যাপকভাবে নির্ধারণ করার চেষ্টা করে। তবে পিছনে থাকা সমস্যা এবং সংকেত দ্বন্দ্বগুলি অপ্টিমাইজেশান সত্ত্বেও সতর্কতার প্রয়োজন।


/*backtest
start: 2023-09-06 00:00:00
end: 2023-09-13 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
strategy("5MSM VISHNU", overlay=true,process_orders_on_close=true)
//indicator(title="mahakaal", shorttitle="mahakaal", timeframe="", timeframe_gaps=true)

green = #26A69A
red = #FF0000
Yellow = #fcf932

// Getting inputs
fast_length = input(title="Fast Length", defval=12)
slow_length = input(title="Slow Length", defval=26)
src3 = input(title="Source", defval=close)
signal_length = input.int(title="Signal Smoothing",  minval = 1, maxval = 50, defval = 9)
sma_source = input.string(title="Oscillator MA Type",  defval="EMA", options=["SMA", "EMA"])
sma_signal = input.string(title="Signal Line MA Type", defval="EMA", options=["SMA", "EMA"])
// Plot colors
col_macd = input(#2962FF, "MACD Line  ", group="Color Settings", inline="MACD")
col_signal = input(#FF6D00, "Signal Line  ", group="Color Settings", inline="Signal")
col_grow_above = input(#26A69A, "Above   Grow", group="Histogram", inline="Above")
col_fall_above = input(#B2DFDB, "Fall", group="Histogram", inline="Above")
col_grow_below = input(#FFCDD2, "Below Grow", group="Histogram", inline="Below")
col_fall_below = input(#FF5252, "Fall", group="Histogram", inline="Below")
// Calculating
fast_ma = sma_source == "SMA" ? ta.sma(src3, fast_length) : ta.ema(src3, fast_length)
slow_ma = sma_source == "SMA" ? ta.sma(src3, slow_length) : ta.ema(src3, slow_length)
macd = fast_ma - slow_ma
signal = sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length)
hist = macd - signal
//hline(0, "Zero Line", color=color.new(#787B86, 50))

//@version=5
//indicator(title="Moving Average Exponential", shorttitle="EMA", overlay=true, timeframe="", timeframe_gaps=true)
len = input.int(200, minval=1, title="Length")
src2 = input(close, title="Source")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500)
Bahubali = ta.ema(src2, len)
//plot(out, title="EMA", color=color.blue, offset=offset)

//@version=5
//indicator(title="Williams Alligator", shorttitle="Alligator", overlay=true, timeframe="", timeframe_gaps=true)
smma(src, length) =>
	smma =  0.0
	smma := na(smma[1]) ? ta.sma(src, length) : (smma[1] * (length - 1) + src) / length
	smma
jawLength = input.int(13, minval=1, title="Jaw Length")
teethLength = input.int(8, minval=1, title="Teeth Length")
lipsLength = input.int(5, minval=1, title="Lips Length")
jawOffset = input(8, title="Jaw Offset")
teethOffset = input(5, title="Teeth Offset")
lipsOffset = input(3, title="Lips Offset")
jaw = smma(hl2, jawLength)
teeth = smma(hl2, teethLength)
lips = smma(hl2, lipsLength)
//plot(jaw, "Jaw", offset = jawOffset, color=#2962FF)


if (hist > 9)

    hist := 10


if (hist < -9)

    hist := -10

// Compose alert message
// Entry
alert_msg_long_entry =  
             "BUY 🟢 {{ticker}} CE " + str.tostring(math.floor((close - 100)/100)*100)       + "\n"   + 
             "####################\n\n" + 
             "{{strategy.order.id}}💹 Target 1:  "         + str.tostring(math.round(close + 35))       + "\n"   + 
             "{{strategy.order.id}}💹 Target 2:  "         + str.tostring(math.round(close + 45))       + "\n"   +  
             "\n"   +  
             "{{strategy.order.id}} Stop Loss: "         + str.tostring(math.round(close - 30))       + "\n\n" + 
             "\n"   + 
             "ENTRY PRICE: "                              + str.tostring(math.round(close))       + "\n\n" +
             "Current time: {{timenow}} \n"        +      
             "Education purpose only"
             
// Entry
alert_msg_short_entry =  
             "BUY 🟢 {{ticker}} PE " + str.tostring(math.floor((close + 100)/100)*100)       + "\n"   + 
             "####################\n\n" + 
             "{{strategy.order.id}}💹 Target 1:  "         + str.tostring(math.round(close - 35))       + "\n"   + 
             "{{strategy.order.id}}💹 Target 2:  "         + str.tostring(math.round(close - 45))       + "\n"   +  
             "\n"   +  
             "ENTRY PRICE: "                             + str.tostring(math.round(close))       + "\n\n" +
             "{{strategy.order.id}} Stop Loss: "         + str.tostring(math.round(close + 30))       + "\n\n" + 
             "Current time: {{timenow}} \n"     +         
             "Education purpose only"
// EXIT
alert_msg_long_exit =  
             "🛑 EXIT {{ticker}} CE LONG POSITION  ! \n" +
             "EXIT PRICE: "                  + str.tostring(math.round(close))            + "\n"   + 
             "\n"   + 
             "Dont wait for exit msg in this 🆓 CHANNEL !! \n" +
             "For 💯% accurate & profitable 💰💰💰 EXIT: \n" +
             "BUY our 'triDEV' tradingview indicator strategy\n" +
             "https://wa.me/917020641496"
             

// EXIT
alert_msg_short_exit =  
             "🛑 EXIT {{ticker}} PE Short POSITION  ! \n" +
             "EXIT PRICE: "                  + str.tostring(math.round(close))            + "\n"   + 
             "\n"   + 
             "Dont wait for exit msg in this 🆓 CHANNEL !! \n" +
             "For 💯% accurate & profitable 💰💰💰 EXIT: \n"   +
             "BUY our 'triDEV' tradingview indicator strategy\n" +
             "https://wa.me/917020641496"
             
             



tyme = time("1440", "0920-1515")

bullishtrend = ((hist > 0)  and (close > lips ) and (low > lips ) and (close > Bahubali) and (lips > jaw) and tyme)
bearishtrend = ((hist < 0)  and (close < lips ) and (high < lips ) and (close < Bahubali) and (lips < jaw) and tyme)
//plot(hist, title="Histogram", style=plot.style_columns, color=(hist > 0 ? ( bullishtrend ? green : Yellow ) : ( bearishtrend ? red : Yellow ) ))

strategy.entry("long", strategy.long, when = bullishtrend , alert_message = alert_msg_long_entry )
strategy.entry("short",strategy.short,when = bearishtrend , alert_message = alert_msg_short_entry)


longexit = (close < lips)  or time("1440", "1515-1530") or (hist <= 0) //or (close < Bahubali)
shortexit = (close > lips) or time("1440", "1515-1530")or (hist >= 0) //or (close > Bahubali)
//strategy.exit("long tsl", "long", trail_points = close * 0.01 / syminfo.mintick, trail_offset = close * 0.01 / syminfo.mintick)
//strategy.exit("shoty tsl", "short", trail_points = close * 0.01 / syminfo.mintick, trail_offset = close * 0.01 / syminfo.mintick)
strategy.exit("long TSL", "long", limit = lips ,when = (longexit), alert_message = alert_msg_long_exit)
strategy.exit("short TSL","short",limit = lips ,when = (shortexit), alert_message = alert_msg_short_exit)

//PLOT FIXED SLTP LINE
// LONG POSITION
long_take_level_1 = strategy.position_avg_price + 35
long_take_level_2 = strategy.position_avg_price + 40
long_stop_level = strategy.position_avg_price - 30

plot(strategy.position_size > 0 ? long_take_level_1 : na, style=plot.style_linebr, color=color.green, linewidth=1, title="1st Long Take Profit")
plot(strategy.position_size > 0 ? long_take_level_2 : na, style=plot.style_linebr, color=color.green, linewidth=1, title="2nd Long Take Profit")
plot(strategy.position_size > 0 ? long_stop_level : na, style=plot.style_linebr, color=color.red, linewidth=1, title="Long Stop Loss")

//PLOT FIXED SLTP LINE
// SHORT POSITION
SHORT_take_level_1 = strategy.position_avg_price - 35
SHORT_take_level_2 = strategy.position_avg_price - 40
SHORT_stop_level = strategy.position_avg_price + 30

plot(strategy.position_size < 0 ? SHORT_take_level_1 : na, style=plot.style_linebr, color=color.green, linewidth=1, title="1st SHORT Take Profit")
plot(strategy.position_size < 0 ? SHORT_take_level_2 : na, style=plot.style_linebr, color=color.green, linewidth=1, title="2nd SHORT Take Profit")
plot(strategy.position_size < 0 ? SHORT_stop_level : na, style=plot.style_linebr, color=color.red, linewidth=1, title="SHORT Stop Loss")



আরো