اوسط ریورس مومنٹم حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2023-11-15 17:40:59
ٹیگز:

img

جائزہ

اوسط ریورسشن رفتار کی حکمت عملی ایک رجحان ٹریڈنگ کی حکمت عملی ہے جو قلیل مدتی قیمتوں کی اوسط کو ٹریک کرتی ہے۔ یہ درمیانی مدتی مارکیٹ کے رجحان کا فیصلہ کرنے کے لئے اوسط ریورسشن اشارے اور رفتار اشارے کو جوڑتی ہے۔

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

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

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

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

حکمت عملی میں منافع لینے اور نقصان کو روکنے کے انتظام کے لئے فیصد منافع کا ہدف اور فیصد سٹاپ نقصان کو بھی یکجا کیا گیا ہے۔

باہر نکلنے کا طریقہ چلتی اوسط کراس اوور یا لکیری رجسٹریشن کراس اوور کے درمیان انتخاب کرسکتا ہے۔

دو طرفہ تجارت، رجحان فلٹرنگ، منافع لینے اور سٹاپ نقصان وغیرہ کے امتزاج کے ذریعے، یہ وسط مدتی مارکیٹ کے رجحانات کا فیصلہ اور ٹریکنگ کا احساس کرتا ہے.

فوائد

  1. اوسط ریورس انڈیکیٹر مؤثر طریقے سے قدر کے مرکز سے قیمت کے انحراف کا فیصلہ کرسکتا ہے۔

  2. رفتار اشارے SMA مختصر مدت مارکیٹ شور فلٹر کر سکتے ہیں.

  3. دو طرفہ تجارت تمام سمتوں میں رجحان کے مواقع کو مکمل طور پر پکڑ سکتی ہے۔

  4. منافع لینے اور سٹاپ نقصان کے طریقہ کار سے خطرات کو مؤثر طریقے سے کنٹرول کیا جاسکتا ہے۔

  5. انتخاب کے قابل اخراج کے طریقوں کو مارکیٹ کے حالات کے مطابق کرنے کے لئے لچکدار ہوسکتا ہے.

  6. ایک مکمل رجحان ٹریڈنگ کی حکمت عملی جو درمیانی مدت کے رجحانات کو بہتر طور پر پکڑتی ہے۔

خطرات

  1. اوسط ریورس اشارے پیرامیٹر کی ترتیبات کے لئے حساس ہے، غلط حد کی ترتیبات غلط سگنل کا سبب بن سکتی ہیں.

  2. غیر مستحکم مارکیٹ کے حالات میں، سٹاپ نقصان بہت کثرت سے شروع کیا جا سکتا ہے.

  3. ضمنی رجحانات میں، تجارتی تعدد بہت زیادہ ہوسکتی ہے، تجارتی اخراجات اور سکڑنے کے خطرات میں اضافہ.

  4. جب ٹریڈنگ آلہ میں ناکافی لیکویڈیٹی ہوتی ہے تو ، سلائڈج کنٹرول ناقص ہوسکتا ہے۔

  5. دو طرفہ تجارت میں زیادہ خطرات ہوتے ہیں، اس لیے محتاط منی مینجمنٹ کی ضرورت ہوتی ہے۔

یہ خطرات پیرامیٹر کی اصلاح، سٹاپ نقصان ایڈجسٹمنٹ، منی مینجمنٹ وغیرہ کے ذریعے کنٹرول کیا جا سکتا ہے.

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

  1. مختلف تجارتی آلات کو بہتر بنانے کے لئے اوسط ریورس اور رفتار کے اشارے کی پیرامیٹر کی ترتیبات کو بہتر بنائیں۔

  2. رجحان کی شناخت کی صلاحیت کو بہتر بنانے کے لئے رجحان کی شناخت کے اشارے شامل کریں.

  3. سٹاپ نقصان کی حکمت عملی کو بہتر بنانے کے لئے مارکیٹ کے اہم اتار چڑھاؤ کے مطابق بہتر بنانے کے لئے.

  4. پوزیشن سائزنگ ماڈیولز کو مارکیٹ کے حالات کی بنیاد پر پوزیشن سائز کو ایڈجسٹ کرنے کے لئے شامل کریں.

  5. مزید رسک مینجمنٹ ماڈیولز شامل کریں، جیسے زیادہ سے زیادہ ڈراؤنڈ کنٹرول، ایکویٹی وکر کنٹرول وغیرہ۔

  6. خود کار طریقے سے حکمت عملی کے پیرامیٹرز کو بہتر بنانے کے لئے مشین سیکھنے کے طریقوں کو یکجا کرنے پر غور کریں.

خلاصہ

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


/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 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: Mean Reversion Strategy", overlay=true)

LongShort       = input(title="Long Only or Short Only or Both?", type=input.string, defval="Both", options=["Both", "Long Only", "Short Only"])
Lookback        = input(title="Length", type=input.integer, defval=10, minval=0)
LThr1           = input(title="Upper threshold", type=input.float, defval=1, minval=0)
LThr            = input(title="Lower threshold", type=input.float, defval=-1, maxval=0)
src             = input(title="Source", type=input.source, defval=close)
LongShort2      = input(title="Linear Regression Exit or Moving Average Exit?", type=input.string, defval="MA", options=["LR", "MA"])
SMAlenL         = input(title="MA/LR Exit Length", type = input.integer ,defval=10)
SMALen2         = input(title="Trend SMA Length", type = input.integer ,defval=200)
AboveBelow      = input(title="Above or Below Trend SMA?", type=input.string, defval="Above", options=["Above", "Below", "Don't Include"])
PTbutton        = input(title="Profit Target On/Off", type=input.bool, defval=true)
ProfitTarget    = input(title="Profit Target %", type=input.float, defval=1, step=0.1, minval=0)
SLbutton        = input(title="Stop Loss On/Off", type=input.bool, defval=true)
StopLoss        = input(title="Stop Loss %", type=input.float, defval=-1, step=0.1, maxval=0)

x               = (src-linreg(src,Lookback,0))/(stdev(src,Lookback))

plot(linreg(src,Lookback,0))

//PROFIT TARGET & STOPLOSS

if PTbutton == true and SLbutton == true
    strategy.exit("EXIT", profit=((close*(ProfitTarget*0.01))/syminfo.mintick), loss=((close*(StopLoss*-0.01))/syminfo.mintick))
else
    if PTbutton == true and SLbutton == false
        strategy.exit("PT EXIT", profit=((close*(ProfitTarget*0.01))/syminfo.mintick))
    else
        if PTbutton == false and SLbutton == true
            strategy.exit("SL EXIT", loss=((close*(StopLoss*-0.01))/syminfo.mintick))
        else    
            strategy.cancel("PT EXIT")


////////////////////////
//MOVING AVERAGE EXIT//
//////////////////////

if LongShort=="Long Only" and AboveBelow=="Above" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) and close>sma(close,SMALen2))
    strategy.close("LONG", when = close>sma(close,SMAlenL))

if LongShort=="Long Only" and AboveBelow=="Below" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) and close<sma(close,SMALen2))
    strategy.close("LONG", when = close>sma(close,SMAlenL))

if LongShort=="Long Only" and AboveBelow=="Don't Include" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) )
    strategy.close("LONG", when = close>sma(close,SMAlenL))
    
///////    
    
if LongShort=="Short Only" and AboveBelow=="Above" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1 and close>sma(close,SMAlenL) and close>sma(close,SMALen2))
    strategy.close("SHORT", when = close<sma(close,SMAlenL))

if LongShort=="Short Only" and AboveBelow=="Below" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1 and close>sma(close,SMAlenL)   and close<sma(close,SMALen2))
    strategy.close("SHORT", when = close<sma(close,SMAlenL))

if LongShort=="Short Only" and AboveBelow=="Don't Include" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1  and close>sma(close,SMAlenL)  )
    strategy.close("SHORT", when = close<sma(close,SMAlenL))
    
//////

if LongShort=="Both" and AboveBelow=="Above" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) and close>sma(close,SMALen2))
    strategy.close("LONG", when = close>sma(close,SMAlenL))

if LongShort=="Both" and AboveBelow=="Below" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) and close<sma(close,SMALen2))
    strategy.close("LONG", when = close>sma(close,SMAlenL))

if LongShort=="Both" and AboveBelow=="Don't Include" and LongShort2 =="MA"
    strategy.entry("LONG", true, when = x<LThr and close<sma(close,SMAlenL) )
    strategy.close("LONG", when = close>sma(close,SMAlenL))
    
///////    
    
if LongShort=="Both" and AboveBelow=="Above" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1 and close>sma(close,SMAlenL) and close>sma(close,SMALen2))
    strategy.close("SHORT", when = close<sma(close,SMAlenL))

if LongShort=="Both" and AboveBelow=="Below" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1 and close>sma(close,SMAlenL) and close<sma(close,SMALen2))
    strategy.close("SHORT", when = close<sma(close,SMAlenL))

if LongShort=="Both" and AboveBelow=="Don't Include" and LongShort2 =="MA"
    strategy.entry("SHORT", false, when = x>LThr1 and close>sma(close,SMAlenL) )
    strategy.close("SHORT", when = close<sma(close,SMAlenL))
    
/////////////////
//LIN REG EXIT//
///////////////

if LongShort=="Long Only" and AboveBelow=="Above" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) and close>sma(close,SMALen2))
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))

if LongShort=="Long Only" and AboveBelow=="Below" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) and close<sma(close,SMALen2))
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))

if LongShort=="Long Only" and AboveBelow=="Don't Include" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) )
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))
    
///////    
    
if LongShort=="Short Only" and AboveBelow=="Above" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1 and close>linreg(close,SMAlenL,0) and close>sma(close,SMALen2))
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))

if LongShort=="Short Only" and AboveBelow=="Below" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1 and close>linreg(close,SMAlenL,0)   and close<sma(close,SMALen2))
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))

if LongShort=="Short Only" and AboveBelow=="Don't Include" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1  and close>linreg(close,SMAlenL,0)  )
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))
    
//////

if LongShort=="Both" and AboveBelow=="Above" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) and close>sma(close,SMALen2))
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))

if LongShort=="Both" and AboveBelow=="Below" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) and close<sma(close,SMALen2))
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))

if LongShort=="Both" and AboveBelow=="Don't Include" and LongShort2 =="LR"
    strategy.entry("LONG", true, when = x<LThr and close<linreg(close,SMAlenL,0) )
    strategy.close("LONG", when = close>linreg(close,SMAlenL,0))
    
///////    
    
if LongShort=="Both" and AboveBelow=="Above" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1 and close>linreg(close,SMAlenL,0) and close>sma(close,SMALen2))
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))

if LongShort=="Both" and AboveBelow=="Below" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1 and close>linreg(close,SMAlenL,0) and close<sma(close,SMALen2))
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))

if LongShort=="Both" and AboveBelow=="Don't Include" and LongShort2 =="LR"
    strategy.entry("SHORT", false, when = x>LThr1 and close>linreg(close,SMAlenL,0) )
    strategy.close("SHORT", when = close<linreg(close,SMAlenL,0))






مزید