
ডাবল ইএমএ কৌশল একটি প্রবণতা অনুসরণ কৌশল যা বিভিন্ন চক্রের ইএমএ গণনা করে দামের প্রবণতা দিকটি সনাক্ত করে, যার ভিত্তিতে পোজিশন বা পজিশন বন্ধ করার সিদ্ধান্ত নেওয়া হয়। এই কৌশলটি সহজ এবং কার্যকর এবং প্রবণতাযুক্ত বাজারের জন্য উপযুক্ত।
এই কৌশলটি মূলত দুটি ইএমএ সূচকের উপর ভিত্তি করে তৈরি করা হয়েছে, একটি হল সংক্ষিপ্ত সময়ের 9 দিনের ইএমএ এবং অন্যটি দীর্ঘ সময়ের 21 দিনের ইএমএ। তাদের ক্রস হোল্ডিং এবং হোল্ডিং সিগন্যাল।
যখন একটি স্বল্পমেয়াদী ইএমএ একটি দীর্ঘমেয়াদী ইএমএ অতিক্রম করে, তখন এটি একটি উচ্চতর প্রবণতা হিসাবে বিবেচিত হয়, এই কৌশলটি একটি উচ্চতর প্রবণতা অনুসরণ করে। যখন একটি স্বল্পমেয়াদী ইএমএ একটি দীর্ঘমেয়াদী ইএমএ অতিক্রম করে, তখন এটি একটি নিম্ন প্রবণতা হিসাবে বিবেচিত হয়, এই কৌশলটি একটি শূন্য প্রবণতা তৈরি করে এবং মূল্যের পতন অনুসরণ করে।
ইএমএ সূচক মূল্যের তথ্যের মধ্যে শব্দকে কার্যকরভাবে ফিল্টার করতে সক্ষম, মূল্যের প্রবণতার মূল দিকগুলি সনাক্ত করে। অতএব, এই কৌশলটি ডাবল ইএমএ সূচকগুলিকে দীর্ঘ মূল্যের প্রবণতা চক্রগুলি ধরার প্রত্যাশায় পজিশন এবং পজিশনের ভিত্তিতে ব্যবহার করে।
এই কৌশলটির সুবিধাগুলো হলঃ
এই কৌশলটির কিছু ঝুঁকিও রয়েছেঃ
এই কৌশলটি নিম্নলিখিত দিকগুলি থেকে অপ্টিমাইজ করা যায়ঃ
ডাবল ইএমএ কৌশলটি সামগ্রিকভাবে একটি খুব ব্যবহারিক প্রবণতা অনুসরণকারী কৌশল। এটি পরিচালনা করা সহজ, সহজেই বোঝা যায় এবং শক্তিশালী প্রবণতাযুক্ত বাজারে দুর্দান্ত পারফরম্যান্স করে। তবে এই কৌশলটিতে কিছু ঝুঁকিও রয়েছে যা কৌশলটির স্থায়িত্ব বাড়ানোর জন্য বিভিন্ন মাত্রা থেকে অপ্টিমাইজ করা যেতে পারে। সামগ্রিকভাবে, ডাবল ইএমএ কৌশলটি পরিমাণযুক্ত ব্যবসায়ের জন্য একটি গুরুত্বপূর্ণ রেফারেন্স টেমপ্লেট।
/*backtest
start: 2023-02-21 00:00:00
end: 2024-02-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
// This can only draw so many lines. Use bar replay to go back further
strategy("Strategy Lines", shorttitle="Strategy Lines", overlay=true, max_lines_count=500)
//###########################################################################################################################################
// Replace your strategy here
//###########################################################################################################################################
shortEMA = ta.ema(close, input(9, title="Short EMA Length"))
longEMA = ta.ema(close, input(21, title="Long EMA Length"))
// Entry conditions for long and short positions
longCondition = ta.crossover(shortEMA, longEMA)
shortCondition = ta.crossunder(shortEMA, longEMA)
//###########################################################################################################################################
// Strategy Lines
//###########################################################################################################################################
var timeLow = bar_index
var line li = na
var openLPrice = 0.0000
var openSPrice = 0.0000
LongWColor = input.color(color.rgb(0,255,0,0),"Long Win Color", group="Strategy Lines")
LongLColor = input.color(color.rgb(0,0,255,0),"Long Loss Color", group="Strategy Lines")
ShortWColor = input.color(color.rgb(255,255,0,0),"Short Win Color", group="Strategy Lines")
ShortLColor = input.color(color.rgb(255,0,0,0),"Short Loss Color", group="Strategy Lines")
WinFontColor = input.color(color.rgb(0,0,0,0),"Win Font Color", group="Strategy Lines")
LossFontColor = input.color(color.rgb(255,255,255,0),"Loss Font Color", group="Strategy Lines")
LinesShowLabel = input(false,"Show Labels?",group = "Strategy Lines")
// // Start new line when we go long
// if strategy.position_size >0
// line.delete(li)
// li := line.new(timeLow, close[bar_index-timeLow], bar_index, close, width=2, color=close>openLPrice?LongWColor:LongLColor)
// // Start new line when we go short
// if strategy.position_size <0
// line.delete(li)
// li := line.new(timeLow, close[bar_index-timeLow], bar_index, close, width=2, color=close<openSPrice?ShortWColor:ShortLColor)
// //Delete Lines if we don't have a position open
// if strategy.position_size ==0
// li := line.new(timeLow, close[bar_index-timeLow], bar_index, close, width=2, color=color.rgb(0,0,0,100))
// line.delete(li)
if LinesShowLabel
// Short Label
if strategy.position_size>=0 and strategy.position_size[1] <0
label.new(
timeLow, na,
text=str.tostring((openSPrice-close[1])/(syminfo.mintick*10)),
color=close[1]<openSPrice?ShortWColor:ShortLColor,
textcolor=close[1]<openSPrice?WinFontColor:LossFontColor,
size=size.small,
style=label.style_label_down, yloc=yloc.abovebar)
// Long Label
if strategy.position_size<=0 and strategy.position_size[1] >0
label.new(
timeLow, na,
text=str.tostring((close[1]-openLPrice)/(syminfo.mintick*10)),
color=close[1]>openLPrice?LongWColor:LongLColor,
textcolor=close[1]>openLPrice?WinFontColor:LossFontColor,
size=size.small,
style=label.style_label_down, yloc=yloc.abovebar)
// Open long position and draw line
if (longCondition)
//strategy.entry("Long", strategy.long)
// timeLow := bar_index
// li := line.new(timeLow, close[bar_index-timeLow], bar_index, close, width=2, color=close>openLPrice?LongWColor:LongLColor)
openLPrice := close
// Open short position and draw line
if (shortCondition)
//strategy.entry("Short", strategy.short)
// timeLow := bar_index
// li := line.new(timeLow, close[bar_index-timeLow], bar_index, close, width=2, color=close<openSPrice?ShortWColor:ShortLColor)
openSPrice := close
//###########################################################################################################################################
// Strategy Execution (Replace this as well)
//###########################################################################################################################################
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)