গড় বিপরীতমুখী গতি কৌশল


সৃষ্টির তারিখ: 2023-11-15 17:40:59 অবশেষে সংশোধন করুন: 2023-11-15 17:40:59
অনুলিপি: 0 ক্লিকের সংখ্যা: 833
1
ফোকাস
1617
অনুসারী

গড় বিপরীতমুখী গতি কৌশল

ওভারভিউ

গড় রিটার্ন ডায়নামিক কৌশল একটি ট্রেন্ড ট্রেডিং কৌশল যা স্বল্পমেয়াদী দামের গড় অনুসরণ করে। এটি গড় রিটার্ন সূচক এবং গতিশীলতার সূচককে একত্রিত করে বাজারের মধ্যমেয়াদী প্রবণতার বিচার করে।

কৌশল নীতি

এই কৌশলটি প্রথমে দামের গড় রিটার্ন লাইন এবং স্ট্যান্ডার্ড ডিফারেনশিয়াল গণনা করে। তারপরে উপরের থ্রেশহোল্ড এবং লোয়ার থ্রেশহোল্ড প্যারামিটারগুলির সাথে সংযুক্ত একটি ভাল থ্রেশহোল্ড সেট করে, দামটি গড় রিটার্ন লাইনের এক স্ট্যান্ডার্ড ডিফারেনশিয়ালের বাইরে চলেছে কিনা তা গণনা করে। যদি এটি অতিক্রম করে তবে একটি লেনদেনের সংকেত দেওয়া হয়।

মাল্টি-হেড সিগন্যালের জন্য, দামটি গড় মানের রিটার্ন লাইনের চেয়ে কম একটি স্ট্যান্ডার্ড ডিফারেনশিয়ালের প্রয়োজন, ক্লোজ দামটি এসএমএ গড়ের চেয়ে কম এবং ট্রেন্ড এসএমএর গড়ের চেয়ে বেশি, এই তিনটি শর্ত পূরণ করার জন্য একাধিক দিকে পজিশন খোলার প্রয়োজন। প্যাসিংয়ের শর্তটি হল দামের উপর লম্বা সময়কালের এসএমএ গড়।

খালি মাথা সংকেতের জন্য, একটি মান পার্থক্যের চেয়ে বেশি দামের প্রয়োজন, LENGTH চক্রের এসএমএর গড়ের চেয়ে বেশি দামের কাছাকাছি, এবং ট্রেন্ড এসএমএর গড়ের নিচে, এই তিনটি শর্ত পূরণ করার জন্য খালি দিকের একটি পজিশন খোলার প্রয়োজন। প্যাসিংয়ের শর্তটি হল দামের নীচে লম্বা চক্রের এসএমএর গড়।

এই কৌশলটি একই সাথে শতাংশ লাভের লক্ষ্য এবং শতাংশ স্টপ লসকে একত্রিত করে স্টপ লস ম্যানেজমেন্টের জন্য।

Exit পদ্ধতিতে একটি চলমান গড় বিভাজন বা একটি লিনিয়ার রিগ্রেশন বিভাজন নির্বাচন করা যেতে পারে।

মাল্টিফোরেক্স ডাবল ট্রেডিং, ট্রেন্ড ফিল্টারিং, স্টপ লস এবং অন্যান্য সমন্বয়ের মাধ্যমে, বাজারের মাঝারি মেয়াদী প্রবণতার বিচার এবং ট্র্যাকিং করা সম্ভব।

কৌশলগত সুবিধা

  1. গড় মূল্যের রিটার্ন সূচক মূল্যের কেন্দ্র থেকে বিচ্যুত কিনা তা কার্যকরভাবে নির্ধারণ করতে পারে

  2. গতিশীলতা এসএমএগুলি স্বল্পমেয়াদী বাজারের শব্দগুলিকে ফিল্টার করে

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