
ডাবল মুভিং এভারেজ স্ট্যাডি ট্রেডিং কৌশলটি তুলনামূলকভাবে দুর্বল সূচক ((আরএসআই) এবং পরিবর্তনের হার সূচক ((আরওসি) এর দ্বৈত শক্তিকে সংযুক্ত করে, যা মধ্য-দীর্ঘ লাইন প্রবণতার দিকটি সনাক্ত করতে ব্যবহৃত হয়। এই কৌশলটি একই সাথে ফিল্টারিং শর্ত এবং স্টপ লস শর্তগুলি সেট করে, যা প্রবণতার দিকের নিশ্চিতকরণের ভিত্তিতে এন্ট্রি করতে সক্ষম করে, যা মিথ্যা ব্রেকআউটের ঝুঁকি কার্যকরভাবে হ্রাস করে।
এই কৌশলটি RSI সূচক এবং ROC সূচকের সংমিশ্রণের উপর ভিত্তি করে প্রবেশের সময় নির্ধারণ করে। যখন দামগুলি আপেক্ষিক oversold অঞ্চলের কাছাকাছি আসে তখন এটি কাঠামোগত বিপর্যয় বলে মনে করা হয়, একটি বিপরীত সংকেত তৈরি করে; যখন দামগুলি আপেক্ষিক oversold অঞ্চলে ওঠানামা করে, তখন বর্তমান প্রবণতাটি কিছু সময়ের জন্য চলতে থাকে। ROC সূচকটি পরিবর্তনের হারের দৃষ্টিকোণ থেকে দামের পরিবর্তনের প্রবণতা এবং শক্তি নির্ধারণ করে।
এছাড়াও, এই কৌশলটি মধ্য-লম্বা লাইনের প্রবণতা এবং স্বল্পমেয়াদী স্টপ লাইনের জন্য এসএমএ এবং ফিল্টারিং শর্ত যুক্ত করেছে, যা কৌশলটি কেবলমাত্র মধ্য-লম্বা লাইনের প্রবণতার দিকনির্দেশে নিশ্চিত করে এবং স্বল্পমেয়াদে কোনও স্টপ লস ঝুঁকি না থাকলে প্রবেশ করতে দেয়। এই কনফিগারেশনটি ঝড়ের পরিস্থিতিতে বন্দী হওয়ার সম্ভাবনা হ্রাস করতে পারে, যা ব্যবসায়ীদের জন্য ঝুঁকি নিয়ন্ত্রণযোগ্য।
এই কৌশলটির নমনীয় ইনপুট সেটিংটি ব্যবসায়ীদের কেবলমাত্র RSI বা ROC এর একটি সূচককে প্রবেশের ভিত্তিতে বা উভয়ই সংমিশ্রণ হিসাবে ব্যবহার করার জন্য মুক্ত করে দেয়, যা বিভিন্ন জাত এবং পরিস্থিতির ধরণের জন্য অনুকূলিতকরণযোগ্য, যা কৌশলটির প্রয়োগের সুযোগকে আরও প্রসারিত করে।
এই কৌশলটির সবচেয়ে বড় সুবিধা হ’ল প্রবণতা এবং বিপরীত সিগন্যালের সংমিশ্রণে প্রবেশের সিদ্ধান্ত নেওয়া, ট্রেন্ডিং ফ্যাক্টরগুলি এবং কাঠামোগত সুযোগগুলি উভয়ই বিবেচনা করা, বাজারের কাঠামোগত পরিবর্তনের উপর ভিত্তি করে তৈরি করা, যাতে প্রবেশের সময় সঠিকতা নিশ্চিত করা যায়। একক সূচকের তুলনায় আরএসআই এবং আরওসির সংমিশ্রণ ব্যবহারের ফলে কৌশলটি বাজারের এলোমেলো গোলমালের বিরুদ্ধে আরও শক্তিশালী বিরোধীতা তৈরি করে।
আরেকটি সুবিধা হল কৌশলটির অন্তর্নির্মিত প্রবণতা ফিল্টার (এসএমএ) এবং স্বল্পমেয়াদী স্টপ, যা ঝড়ের পরিস্থিতিতে প্যাচ হওয়ার সম্ভাবনাকে কার্যকরভাবে হ্রাস করতে পারে। প্রবণতা বিচার এবং স্বল্পমেয়াদী স্টপ এই দুটি প্রতিরক্ষামূলক লাইনের সেটআপ এটিকে একটি ঝুঁকি-নিয়ন্ত্রিত স্থিতিশীল কৌশল হিসাবে তৈরি করে।
অবশেষে, এই কৌশলটি একাধিক প্যারামিটার সেটিংয়ের সমন্বয় করে, যা ব্যবসায়ীরা বিভিন্ন জাত এবং প্রবণতা ধরণের জন্য অপ্টিমাইজ করতে পারে, যা কৌশলটির প্রয়োগযোগ্যতাকে খুব বিস্তৃত করে তোলে। ট্রেন্ডিং বা সামঞ্জস্যপূর্ণ উভয় ক্ষেত্রেই, কৌশলটি প্যারামিটারগুলির মাধ্যমে বাজারের পরিবর্তনের সাথে খাপ খাইয়ে নিতে পারে।
এই কৌশলটির সবচেয়ে বড় ঝুঁকি হ’ল RSI এবং ROC এর মতো বিপরীত সিগন্যাল সূচকগুলির একটি নির্দিষ্ট বিলম্ব রয়েছে। যখন প্রবণতা পরিবর্তিত হয়, তখন এই সূচকগুলির একটি নির্দিষ্ট বিলম্ব থাকে যা প্যারামিটারগুলিকে সেট করা থ্রেশহোল্ডের স্তরে নিয়ে যায়। এই বিলম্বের ফলে কৌশলটির প্রবেশের সময়টি দেরী হয়ে যায়, যা প্রবণতার প্রাথমিক সূচনার পর্যায়ে ধরা যায় না।
আরেকটি সম্ভাব্য ঝুঁকি হল যে কম্পনশীল প্রবণতাগুলির মধ্যে, RSI এবং ROC এর প্যারামিটার সেটিংগুলি অত্যধিক সংবেদনশীল হতে পারে, যার ফলে কিছু মিথ্যা সংকেত তৈরি হয়। যদি স্বল্পমেয়াদী স্টপগুলি ট্রিগার করা হয়, তবে এই মিথ্যা সংকেতগুলি সরাসরি প্রকৃত ক্ষতির কারণ হতে পারে।
এই কৌশলটি নিম্নলিখিত দিকগুলি থেকে উন্নত করা যেতে পারেঃ
KDJ, MACD ইত্যাদির মতো আরও সূচক যুক্ত করা হয়েছে, যা বাজার কাঠামোর আরও মাত্রা ব্যবহার করে এবং সংকেতের নির্ভুলতা বাড়ায়
আরএসআই এবং আরওসির প্যারামিটার সেটিংসে একটি স্বনির্ধারিত অপ্টিমাইজেশান মেশিন যুক্ত করা হয়েছে, যা সূচক প্যারামিটারগুলিকে রিয়েল-টাইম অস্থিরতার সাথে গতিশীলভাবে সামঞ্জস্য করতে দেয়
প্রারম্ভিক লজিকটি অপ্টিমাইজ করুন, প্রবণতা সূচক এবং বিপরীত সূচকগুলি শর্ত পূরণ করার সময় একটি নিশ্চিতকরণ ব্যবস্থা সেট করুন, ঝাঁকুনিতে মিথ্যা সংকেত এড়াতে
স্টপ লস এর পরিধি বাড়ান বা স্টপ লস সেট করুন, যাতে রিভার্সনের জন্য আরও জায়গা থাকে যাতে স্টপ লস বেশি ঘন হওয়ার ফলে লভ্যাংশ হ্রাস পায়
ডাবল মুভিং এভারেজ স্ট্যাডি ট্রেডিং কৌশলটি ট্রেন্ড বিচার এবং বিপরীত সূচকগুলির সাথে সফলভাবে মিলিত হয়েছে, মধ্যম এবং দীর্ঘ লাইনের ট্রেন্ড নিশ্চিতকরণের উপর ভিত্তি করে কাঠামোগত সুযোগগুলি ক্যাপচার করে। এই কৌশলটি শক্তিশালী কনফিগারযোগ্যতাও রয়েছে, ব্যবসায়ীরা পৃথক স্টক এবং পরিস্থিতি ধরণের জন্য প্যারামিটার অপ্টিমাইজ করতে পারেন। অন্তর্নির্মিত দ্বৈত সুরক্ষা ব্যবস্থাও এটিকে একটি ঝুঁকি নিয়ন্ত্রণযোগ্য করে তোলে। আরও সূচকগুলিকে আরও সংহত করার বিকল্প বা স্ব-অনুকূলিত প্যারামিটার সামঞ্জস্যের ব্যবস্থা স্থাপনের মাধ্যমে এই কৌশলটির কার্যকারিতা প্রসারিত করার জন্য আরও জায়গা রয়েছে।
/*backtest
start: 2024-01-05 00:00:00
end: 2024-02-04 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © GlobalMarketSignals
//@version=4
strategy("GMS: RSI & ROC Strategy", overlay=true)
LongShort = input(title="Long Only or Short Only or Both?", type=input.string, defval="Both", options=["Both", "Long Only", "Short Only"])
RSIroc = input(title="RSI Only, ROC Only, Both?", type=input.string, defval="Both", options=["Both", "RSI Only", "ROC Only"])
RSILength = input(title="RSI Length", type = input.integer ,defval=14)
RSIUpper = input(title="RSI Upper Threshold", type = input.float ,defval=70)
RSILower = input(title="RSI Lower Threshold", type = input.float ,defval=30)
ROCLength = input(title="ROC Length", type = input.integer ,defval=14)
ROCUpper = input(title="ROC Upper Threshold", type = input.float ,defval=0.01)
ROCLower = input(title="ROC Lower Threshold", type = input.float ,defval=-0.01)
LongExit = input(title="Long Exit SMA Length", type = input.integer ,defval=5)
ShortExit = input(title="Short Exit SMA Length", type = input.integer ,defval=5)
AboveBelow = input(title="Trend SMA Filter?", type=input.string, defval="Above", options=["Above", "Below", "Don't Include"])
TrendLength = input(title="Trend SMA Length", type = input.integer ,defval=200)
//RSI ONLY
//Long Side
if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
//RSI ONLY
//SHORT SIDE
if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "RSI Only"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))
///////-----------------/////////////
///////-----------------/////////////
///////-----------------/////////////
//ROC ONLY
//Long Side
if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
strategy.entry("LONG", true, when = rsi(close,ROCLength)<ROCLower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
//ROC ONLY
//SHORT SIDE
if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "ROC Only"
strategy.entry("SHORT", false, when = roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))
///////-----------------/////////////
///////-----------------/////////////
///////-----------------/////////////
//BOTH
//Long Side
if LongShort =="Long Only" and AboveBelow == "Above" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Below" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Long Only" and AboveBelow == "Don't Include" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close>sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit) and close<sma(close,TrendLength))
strategy.close("LONG", when = close>sma(close,LongExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "Both"
strategy.entry("LONG", true, when = rsi(close,RSILength)<RSILower and roc(close,ROCLength)<ROCLower and close< sma(close,LongExit))
strategy.close("LONG", when = close>sma(close,LongExit))
//BOTH
//SHORT SIDE
if LongShort =="Short Only" and AboveBelow == "Above" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Below" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Short Only" and AboveBelow == "Don't Include" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Above" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close>sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Below" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit) and close<sma(close,TrendLength))
strategy.close("SHORT", when = close<sma(close,ShortExit))
if LongShort =="Both" and AboveBelow == "Don't Include" and RSIroc == "Both"
strategy.entry("SHORT", false, when = rsi(close,RSILength)>RSIUpper and roc(close,ROCLength)>ROCUpper and close> sma(close,ShortExit))
strategy.close("SHORT", when = close<sma(close,ShortExit))