دوہری حرکت پذیر اوسط ٹریڈنگ کی مضبوط حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2024-02-05 10:57:28
ٹیگز:

img

جائزہ

مضبوط ڈبل موونگ ایوریج ٹریڈنگ حکمت عملی درمیانی سے طویل مدتی رجحانات کی سمت کی نشاندہی کرنے کے لئے رشتہ دار طاقت انڈیکس (آر ایس آئی) اور شرح تبدیلی (آر او سی) دونوں اشارے کی طاقت کو یکجا کرتی ہے۔ بلٹ ان فلٹرز اور اسٹاپ نقصان کی شرائط کے ساتھ ، یہ حکمت عملی رجحان کی سمت کی تصدیق کے بعد ہی مارکیٹ میں داخل ہوتی ہے ، جو غلط بریک آؤٹ کے خطرے کو مؤثر طریقے سے کم کرتی ہے۔

حکمت عملی منطق

یہ حکمت عملی اندراج سگنلز کا تعین کرنے کے لئے آر ایس آئی اور آر او سی اشارے کے امتزاج کا استعمال کرتی ہے۔ جب قیمتیں زیادہ خرید / زیادہ فروخت والے علاقوں کی طرف بڑھتی ہیں تو ، یہ ممکنہ الٹ پوائنٹس اور الٹ پوائنٹس کی تشکیل کی نشاندہی کرتی ہے۔ جب قیمتیں ان علاقوں کے اندر گھومتی ہیں تو ، اس سے پتہ چلتا ہے کہ موجودہ رجحان کچھ عرصے تک برقرار رہ سکتا ہے۔ آر او سی اشارے قیمت کے رجحان اور رفتار کو شرح تبدیلی کے نقطہ نظر سے جائزہ لیتا ہے۔ دونوں اشارے مارکیٹ کی ساخت کا جائزہ لینے میں ایک دوسرے کی تکمیل کرتے ہیں۔

اس کے علاوہ ، حکمت عملی میں کسی بھی تجارت میں داخل ہونے سے پہلے درمیانی سے طویل مدتی رجحان فلٹرز (ایس ایم اے) اور قلیل مدتی اسٹاپ نقصان کی لائنیں شامل ہیں۔ اس سے یہ یقینی بناتا ہے کہ اندراجات صرف تصدیق شدہ رجحان کی سمت میں اور دوڑ دوڑ مارکیٹس میں فوری طور پر اسٹاپ نقصان کے خطرات کے بغیر ہی ہوتے ہیں۔ اس طرح کی تشکیلوں سے رینج سے وابستہ ماحول میں وِپساؤڈ ہونے کا امکان کم ہوجاتا ہے ، جس سے حکمت عملی کا خطرہ تاجروں کے لئے قابل انتظام ہوجاتا ہے۔

لچکدار ان پٹ کی ترتیبات تاجروں کو صرف آر ایس آئی ، صرف آر او سی یا ان دونوں کے امتزاج کے درمیان انتخاب کرنے کی بھی اجازت دیتی ہیں۔ اس سے مختلف مصنوعات اور مارکیٹ کے حالات میں حکمت عملی کی موافقت میں اضافہ ہوتا ہے۔

فوائد کا تجزیہ

اس حکمت عملی کا سب سے بڑا فائدہ یہ ہے کہ وہ انٹری فیصلوں کے لئے رجحان اور الٹ سگنل دونوں کو جوڑتا ہے ، جس میں عین مطابق وقت کو یقینی بنانے کے لئے رجحان اور ساختی عوامل دونوں پر غور کیا جاتا ہے۔ ایک اشارے کی حکمت عملی کے مقابلے میں ، آر ایس آئی + آر او سی کمبو بھی مارکیٹ شور اور بے ترتیب کے خلاف حکمت عملی کو زیادہ مضبوط بناتا ہے۔

ایک اور فائدہ یہ ہے کہ بلٹ ان ٹرینڈ فلٹرز (ایس ایم اے) اور قلیل مدتی اسٹاپ نقصان ، جو اتار چڑھاؤ والی منڈیوں میں پھنس جانے کے امکان کو کم کرتے ہیں۔ رجحان کی تشخیص اور قلیل مدتی اسٹاپ نقصان کے ذریعہ دفاع کی دو لائنیں اس کو خطرہ پر قابو پانے والی مضبوط حکمت عملی بناتی ہیں۔

آخر میں ، متعدد پیرامیٹر سیٹنگ کے مجموعے تاجروں کو مختلف مصنوعات اور مارکیٹ کے ماحول کے لئے حکمت عملی کو بہتر بنانے کی اجازت دیتے ہیں۔ چاہے وہ رجحان یا رینج سے وابستہ مارکیٹوں میں ہو ، حکمت عملی پیرامیٹر ٹیوننگ کے ذریعے موافقت پذیر ہوسکتی ہے۔

خطرے کا تجزیہ

حکمت عملی کا سب سے بڑا خطرہ ریورس سگنل اشارے جیسے آر ایس آئی اور آر او سی کی پسماندہ نوعیت سے آتا ہے۔ جب رجحانات تبدیل ہونا شروع ہوجاتے ہیں تو ، یہ اشارے پیرامیٹرز میں طے شدہ حد کی سطح تک پہنچنے سے پہلے اکثر پیچھے رہ جاتے ہیں۔ اس طرح کی تاخیر سے حکمت عملی کے داخلے میں تاخیر ہوسکتی ہے اور اس کی وجہ سے رجحان کے آغاز کے ابتدائی مرحلے کو یاد کرنا پڑتا ہے۔

ایک اور ممکنہ خطرہ یہ ہے کہ اتار چڑھاؤ والی منڈیوں میں ، آر ایس آئی اور آر او سی پیرامیٹر کی ترتیبات بہت حساس ہوسکتی ہیں اور کچھ غلط سگنل پیدا کرسکتی ہیں۔ اگر قلیل مدتی اسٹاپ نقصان کے ساتھ ساتھ متحرک کیا جائے تو ، ایسے غلط سگنل اصل نقصانات کا باعث بن سکتے ہیں۔

اصلاح کی ہدایات

حکمت عملی کو مندرجہ ذیل پہلوؤں میں بہتر بنایا جاسکتا ہے:

  1. مارکیٹ کی ساخت کے کثیر جہتی تشخیص کے ساتھ سگنل کی درستگی کو بہتر بنانے کے لئے KDJ، MACD جیسے کمبو استعمال کے لئے مزید اشارے شامل کریں

  2. آر ایس آئی اور آر او سی پیرامیٹرز میں موافقت پذیر اصلاحاتی میکانزم متعارف کروانا تاکہ ترتیبات کو حقیقی وقت کی اتار چڑھاؤ کی بنیاد پر متحرک طور پر ایڈجسٹ کیا جاسکے

  3. رجحان کے اوزار اور الٹ ٹولز بیک وقت حالات کو پورا کرتے وقت تصدیق کے طریقہ کار کو شامل کرکے اندراج کی منطق کو بہتر بنائیں ، اتار چڑھاؤ میں جھوٹے اشاروں پر عمل کرنے سے گریز کریں

  4. سٹاپ نقصان کی حد کو بڑھانا یا اسٹاپ نقصان کو پیچھے چھوڑنے کے لئے زیادہ جگہ فراہم کرنے کے لئے اسٹاپ نقصان کی حد کو بڑھانا ، اسٹاپ نقصان کے گروپ کے باعث کھوئے ہوئے منافع کو کم کرنا

نتیجہ

مضبوط ڈبل موونگ ایوریج ٹریڈنگ حکمت عملی میں درمیانی سے طویل مدتی رجحان کی تصدیق پر ساختی مواقع کو حاصل کرنے کے لئے رجحان کی تشخیص اور الٹ اشارے کو کامیابی کے ساتھ جوڑ دیا گیا ہے۔ مضبوط تشکیل کے ساتھ ، تاجر انفرادی اسٹاک اور مارکیٹ کے حالات کے لئے پیرامیٹرز کو بہتر بنا سکتے ہیں۔ دفاع کی دوہری لائن بھی اسے خطرہ سے قابو پانے والا انتخاب بناتی ہے۔ مزید اشارے کو شامل کرکے یا موافقت پذیر پیرامیٹر ٹیوننگ میکانزم قائم کرکے کارکردگی میں مزید بہتری حاصل کی جاسکتی ہے۔


/*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))
    
    

مزید