
এটি একটি পরিমাণগত ট্রেডিং কৌশল যা একাধিক সূচকীয় মুভিং এভারেজ (ইএমএ) এর ক্রসিংয়ের উপর ভিত্তি করে, বিভিন্ন সময়কালের ইএমএর ক্রসিং পয়েন্টগুলি ক্যাপচার করে বাজারের প্রবণতা সনাক্ত করে এবং একটি ট্রেডিং সংকেত উত্পন্ন করে। এই কৌশলটি ধাপে ধাপে নিশ্চিতকরণের মাধ্যমে বাজারের গতিশীলতা ক্যাপচার করতে এবং একটি স্বজ্ঞাত দৃশ্যমান প্রবণতা বিচার ব্যবস্থা সরবরাহ করার উদ্দেশ্যে তৈরি করা হয়েছে।
কৌশলটির মূল যুক্তি চারটি ভিন্ন পর্যায়ের EMA এর ক্রস সিগন্যালের উপর ভিত্তি করেঃ
কৌশলটি রঙিন কোডিং দ্বারা বাজারের আবেগকে স্বজ্ঞাতভাবে প্রদর্শন করেঃ নীল রেখাটি উত্সাহী এবং লাল রেখাটি হ্রাসের প্রতিনিধিত্ব করে। রঙের গভীরতা দীর্ঘমেয়াদী ইএমএর তুলনায় স্বল্পমেয়াদী ইএমএর অবস্থান সম্পর্কিত।
মাল্টিপল ইএমএ ক্রস কৌশলটি ক্রমবর্ধমান সংকেত উত্পাদন এবং স্বজ্ঞাত ভিজ্যুয়ালাইজেশনের মাধ্যমে ব্যবসায়ীদের জন্য বাজারের প্রবণতা ধরার একটি পদ্ধতিগত পদ্ধতি সরবরাহ করে। যদিও কিছু সীমাবদ্ধতা রয়েছে তবে ক্রমাগত অপ্টিমাইজেশন এবং ঝুঁকি পরিচালনার মাধ্যমে এই কৌশলটির উল্লেখযোগ্য ব্যবহারিক মূল্য রয়েছে।
/*backtest
start: 2025-02-08 00:00:00
end: 2025-04-02 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BNB_USDT"}]
*/
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © joll3d
//@version=5
strategy("Multi-EMA Crossover Strategy", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, pyramiding=4, default_qty_value=25)
// Calculate EMAs
ema1 = ta.ema(close, 1)
ema5 = ta.ema(close, 5)
ema3 = ta.ema(close, 3)
ema10 = ta.ema(close, 10)
ema20 = ta.ema(close, 20)
ema40 = ta.ema(close, 40)
// Define crossover conditions
longCondition1 = ta.crossover(ema1, ema5)
longCondition2 = ta.crossover(ema3, ema10)
longCondition3 = ta.crossover(ema5, ema20)
longCondition4 = ta.crossover(ema10, ema40)
shortCondition1 = ema1 < ema5
shortCondition2 = ema3 < ema10
shortCondition3 = ema5 < ema20
shortCondition4 = ema10 < ema40
// Execute long entries
if (longCondition1)
strategy.entry("Long 1-5", strategy.long)
if (longCondition2)
strategy.entry("Long 3-10", strategy.long)
if (longCondition3)
strategy.entry("Long 5-20", strategy.long)
if (longCondition4)
strategy.entry("Long 10-40", strategy.long)
if (shortCondition1)
strategy.close("Long 1-5")
if (shortCondition2)
strategy.close("Long 3-10")
if (shortCondition3)
strategy.close("Long 5-20")
if (shortCondition4)
strategy.close("Long 10-40")
// Calculate trend strength
bullishStrength = 0
bullishStrength := (ema1 > ema5 ? 1 : 0) +
(ema3 > ema10 ? 1 : 0) +
(ema5 > ema20 ? 1 : 0) +
(ema10 > ema40 ? 1 : 0)
//set bar colors
bullishColor = color.blue
semiBullishColor = color.rgb(175, 213, 243)
semiBearishColor = color.rgb(245, 178, 178)
bearishColor = color.red
barColor = bearishColor
if bullishStrength == 2
barColor := semiBearishColor
if bullishStrength == 3
barColor := semiBullishColor
if bullishStrength == 4
barColor := bullishColor
barcolor(barColor)