তিন বা চারটি কে-লাইন ব্রেকথ্রু রিভার্সাল কৌশল


সৃষ্টির তারিখ: 2023-12-18 10:39:53 অবশেষে সংশোধন করুন: 2023-12-18 10:39:53
অনুলিপি: 2 ক্লিকের সংখ্যা: 808
1
ফোকাস
1621
অনুসারী

তিন বা চারটি কে-লাইন ব্রেকথ্রু রিভার্সাল কৌশল

ওভারভিউ

তিন বা চার কে লাইন বিপরীত বিপরীত কৌশলটি তিনটি বা চারটি কে লাইনকে চিহ্নিত করে যা কে লাইনে উচ্চ গতির, এবং তারপরে নিম্ন প্রস্থের কে লাইনগুলি সমর্থন বা চাপ তৈরি করে এবং বিপরীত কে লাইনের ঘটনার পরে বিপরীত ট্রেডিংয়ের অন্তর্ভুক্ত।

কৌশল নীতি

এই কৌশলটির মূল সনাক্তকরণ লজিক নিম্নলিখিত অংশগুলি নিয়ে গঠিতঃ

  1. K-লাইন চিহ্নিত করুন যা উল্লেখযোগ্যভাবে বৃদ্ধি পেয়েছে ((Gap Bar): এটিআর এর 1.5 গুণ গড় অতিক্রম করেছে, এবং এর বাস্তব অংশটি 0.65 এর চেয়ে বড়। এই K-লাইনটি শক্তিশালী পতনশীলতা হিসাবে বিবেচিত হয়েছে।

  2. সংক্ষিপ্তসার সংগ্রহের K লাইনগুলি চিহ্নিত করুন ((Collecting Bar): একটি K লাইন যা গ্যাপ বারের পিছনে 1-2 অল্প পরিমাণে ওঠানামা করে, একটি উচ্চ বা একটি নিম্ন গ্যাপ বারের কাছাকাছি। এই K লাইনগুলি ধীর গতি এবং প্রবণতা সংগ্রহের প্রতিনিধিত্ব করে, যা সমর্থন বা চাপ গঠন করে।

  3. বিপরীত সিগন্যাল K লাইন সনাক্তকরণ: K লাইনটি সংকলন করার পরে, যদি কোনও সত্তা পূর্ববর্তী কয়েকটি K লাইনের উচ্চতা বা নিম্নের K লাইনটি ভেঙে দেয় তবে এটি একটি বিপরীত সংকেত হিসাবে বিবেচিত হতে পারে, সত্তার দিকনির্দেশের উপর নির্ভর করে অতিরিক্ত বা খালি করা, এবং এই K লাইনে পজিশন খুলুন।

  4. স্টপ লস এবং স্টপ স্টপঃ স্টপ লস গ্যাপ কে-এর নিম্নতম বা উচ্চতম স্থানে সেট করা হয়; স্টপ লস স্টপ লস পয়েন্টের উপর ভিত্তি করে এবং কনফিগারেশনের ক্ষতির অনুপাতের উপর ভিত্তি করে।

সামর্থ্য বিশ্লেষণ

এই কৌশলটির কয়েকটি প্রধান সুবিধা রয়েছেঃ

  1. K-রেখার নিজস্ব বৈশিষ্ট্য ব্যবহার করে প্রবণতা এবং বিপরীত দিক নির্ধারণ করুন, কোনও সূচকের উপর নির্ভর করবেন না, এবং কোয়ান্টাম সূচক স্ব-বন্দর কোয়ান্টামটি বাস্তবায়ন করুন।

  2. গ্যাপ বার এবং কালেকটিং বারের কঠোর পরিমাপ পদ্ধতিতে সত্যিকারের প্রবণতা এবং সংকলন চিহ্নিত করা যায়।

  3. বিপরীত সিগন্যালের বিচারটি সত্তা ভিত্তিক, যা মিথ্যা সংকেতের সম্ভাবনা হ্রাস করে।

  4. একটি লেনদেনের জন্য মাত্র ৩-৪টি K লাইন প্রয়োজন, যার সময়কাল কম এবং ঘন ঘনতা বেশি।

  5. স্টপ লস সেটিং স্পষ্ট, প্রত্যাহার এবং লাভ-ক্ষতির অনুপাত সহজেই নিয়ন্ত্রণযোগ্য।

ঝুঁকি বিশ্লেষণ

এই কৌশলটির কিছু ঝুঁকি রয়েছেঃ

  1. প্যারামিটার সেটিং এর গুণগত মানের উপর নির্ভর করে, যদি প্যারামিটার সেটিং খুব হালকা হয়, তাহলে ভুয়া সংকেত এবং অর্থ হারাতে ট্রেডিংয়ের সুযোগ বৃদ্ধি পায়।

  2. উচ্চ ফ্রিকোয়েন্সির জাল ভাঙ্গার দ্বারা প্রভাবিত হতে পারে এবং সমস্ত জাল সংকেতকে কার্যকরভাবে ফিল্টার করতে পারে না।

  3. এই ধরনের ঝুঁকির মধ্যে রয়েছে যে, যদি পর্যাপ্ত রিভার্স না থাকে, তাহলে ক্ষতির সম্ভাবনা থাকবে না।

  4. স্টপ লস এর পরিধি অনেক বড়, যার ফলে একক প্যাকেজিংয়ের ফলে অনেক বড় ক্ষতি হতে পারে।

এই ঝুঁকি কমানোর জন্য, নিম্নলিখিত দিকগুলি থেকে অপ্টিমাইজ করা যেতে পারেঃ

  1. অপ্টিমাইজ করা প্যারামিটার, যা Gap Bar এবং Collecting Bar কে আরো সঠিকভাবে সনাক্ত করতে সাহায্য করে।

  2. ফিল্টার যোগ করুন, বিপরীত K লাইন পুনরায় নিশ্চিত হওয়ার পরে পজিশন খুলুন।

  3. স্টপ লস অ্যালগরিদমের অপ্টিমাইজেশান, যাতে স্টপ লস মূল্যের কাছাকাছি থাকে এবং লোকসান আরও নিয়ন্ত্রণযোগ্য হয়।

অপ্টিমাইজেশান দিক

এই কৌশলটির আরও কয়েকটি প্রধান অপ্টিমাইজেশান রয়েছেঃ

  1. কমপ্লেক্স ফিল্টার যুক্ত করুন, যাতে ভুয়া ব্রেকডাউন হস্তক্ষেপ এড়ানো যায়। উদাহরণস্বরূপ, লেনদেনের পরিমাণের সূচক যুক্ত করুন, কেবলমাত্র লেনদেনের পরিমাণ বাড়ার ক্ষেত্রে লেনদেনের সংকেত বিবেচনা করুন।

  2. গড়রেখার সূচকের সাথে, কেবলমাত্র যখন দাম গুরুত্বপূর্ণ গড়রেখার (যেমন 20 তম লাইন, 60 তম লাইন) অতিক্রম করে তখনই লেনদেনের সংকেত বিবেচনা করা হয়।

  3. মাল্টি টাইম ফ্রেম যাচাইকরণ, শুধুমাত্র একাধিক চক্র একই সময়ে সংকেত দেওয়া হলে পজিশন খোলার জন্য।

  4. অপ্টিমাইজ করা স্টপ-অফ শর্তাবলী, বাজারের অস্থিরতা এবং ঝুঁকি পছন্দ অনুসারে মুনাফা এবং ক্ষতির অনুপাতের গতিশীলতা।

  5. ট্রেন্ডিং মার্কেটের পরিস্থিতিতে এই কৌশলটি ব্যবহার করুন।

এই অপ্টিমাইজেশানগুলি কৌশলটির স্থায়িত্ব এবং মুনাফার সম্ভাবনা আরও বাড়িয়ে তুলতে পারে।

সারসংক্ষেপ

তিন বা চার কে লাইন বিপরীত বিপরীত কৌশল উচ্চ মানের প্রবণতা সম্ভাব্য সেগমেন্ট এবং বিপরীত সংকেত সনাক্ত করে ট্রেডিং। অপারেটিং চক্র সংক্ষিপ্ত, উচ্চ ফ্রিকোয়েন্সি, প্রচুর অতিরিক্ত আয় প্রত্যাশিত। তবে কিছু ঝুঁকিও রয়েছে, ঝুঁকি হ্রাস এবং স্থিতিশীলতা বাড়ানোর জন্য অপ্টিমাইজেশন চালিয়ে যাওয়ার প্রয়োজন। সামগ্রিকভাবে, কৌশলটি কার্যকরভাবে ট্রেডিং রূপরেখার নিজস্ব বৈশিষ্ট্যযুক্ত বিচার প্রবণতা এবং বিপরীত পয়েন্ট ব্যবহার করে এবং আরও গবেষণা এবং প্রয়োগের জন্য উপযুক্ত।

কৌশল সোর্স কোড
/*backtest
start: 2023-12-10 00:00:00
end: 2023-12-17 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy(title="Three (3)-Bar and Four (4)-Bar Plays Strategy", shorttitle="Three (3)-Bar and Four (4)-Bar Plays Strategy", overlay=true, calc_on_every_tick=true, currency=currency.USD, default_qty_value=1.0,initial_capital=30000.00,default_qty_type=strategy.percent_of_equity)

frommonth = input(defval = 1, minval = 01, maxval = 12, title = "From Month")
fromday = input(defval = 1, minval = 01, maxval = 31, title = "From day")
fromyear = input(defval = 2021, minval = 1900, maxval = 2100, title = "From Year")

tomonth = input(defval = 12, minval = 01, maxval = 12, title = "To Month")
today = input(defval = 31, minval = 01, maxval = 31, title = "To day")
toyear = input(defval = 2100, minval = 1900, maxval = 2100, title = "To Year")

garBarSetting1 = input(defval = 1.5, minval = 0.0, maxval = 100.0, title = "Gap Bar Size", type = input.float)
garBarSetting2 = input(defval = 0.65, minval = 0.0, maxval = 100.0, title = "Gap Bar Body Size", type = input.float)
TopSetting = input(defval = 0.10, minval = 0.0, maxval = 100.0, title = "Bull Top Bar Size", type = input.float)

profitMultiplier = input(defval = 2.0, minval = 1.0, maxval = 100.0, title = "Profit Multiplier", type = input.float)

// ========== 3-Bar and 4-Bar Play Setup ==========
barSize = abs(high - low)
bodySize = abs(open - close)

gapBar = (barSize > (atr(1000) * garBarSetting1)) and (bodySize >= (barSize * garBarSetting2))  // find a wide ranging bar that is more than 2.5x the size of the average bar size and body is at least 65% of bar size

bullTop = close > close[1] + barSize[1] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (first collecting bull bar)
bullTop2 = close > close[2] + barSize[2] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (first collecting bear bar)
bearTop = close < close[1] - barSize[1] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (second collecting bull bar)
bearTop2 = close < close[2] - barSize[2] * TopSetting ? false : true  // check if top of bar is relatively equal to top of the gap bar (second collecting bear bar)

collectingBarBull = barSize < barSize[1] / 2 and low > close[1] - barSize[1] / 2 and bullTop  // find a collecting bull bar
collectingBarBear = barSize < barSize[1] / 2 and high < close[1] + barSize[1] / 2 and bearTop  // find a collecting bear bar
collectingBarBull2 = barSize < barSize[2] / 2 and low > close[2] - barSize[2] / 2 and bullTop2  // find a second collecting bull bar
collectingBarBear2 = barSize < barSize[2] / 2 and high < close[2] + barSize[2] / 2 and bearTop2  // find a second collecting bear bar

triggerThreeBarBull = close > close[1] and close > close[2] and high > high[1] and high > high[2]  // find a bull trigger bar in a 3 bar play
triggerThreeBarBear = close < close[1] and close < close[2] and high < high[1] and high < high[2]  // find a bear trigger bar in a 3 bar play
triggerFourBarBull = close > close[1] and close > close[2] and close > close[3] and high > high[1] and high > high[2] and high > high[3]  // find a bull trigger bar in a 4 bar play
triggerFourBarBear = close < close[1] and close < close[2] and close < close[3] and high < high[1] and high < high[2] and high < high[3]  // find a bear trigger bar in a 4 bar play

threeBarSetupBull = gapBar[2] and collectingBarBull[1] and triggerThreeBarBull  // find 3-bar Bull Setup
threeBarSetupBear = gapBar[2] and collectingBarBear[1] and triggerThreeBarBear  // find 3-bar Bear Setup
fourBarSetupBull = gapBar[3] and collectingBarBull[2] and 
   collectingBarBull2[1] and triggerFourBarBull  // find 4-bar Bull Setup
fourBarSetupBear = gapBar[3] and collectingBarBear[2] and 
   collectingBarBear2[1] and triggerFourBarBear  // find 4-bar Bear Setup

labels = input(title="Show Buy/Sell Labels?", type=input.bool, defval=true)

plotshape(threeBarSetupBull and labels, title="3-Bar Bull", text="3-Bar Play", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
plotshape(threeBarSetupBear and labels, text="3-Bar Bear", title="3-Bar Play", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.red, textcolor=color.white, transp=0)
plotshape(fourBarSetupBull and labels, title="4-Bar Bull", text="4-Bar Play", location=location.abovebar, style=shape.labeldown, size=size.tiny, color=color.green, textcolor=color.white, transp=0)
plotshape(fourBarSetupBear and labels, text="4-Bar Bear", title="4-Bar Play", location=location.belowbar, style=shape.labelup, size=size.tiny, color=color.red, textcolor=color.white, transp=0)

alertcondition(threeBarSetupBull or threeBarSetupBear or fourBarSetupBull or fourBarSetupBear, title="3-bar or 4-bar Play", message="Potential 3-bar or 4-bar Play")
float sl = na
float tp = na
sl := nz(sl[1], 0.0)
tp := nz(tp[1], 0.0)
plot(sl==0.0?na:sl,title='SL', color = color.red)
plot(tp==0.0?na:tp,title='TP', color = color.green)
if (true)
    if threeBarSetupBull and strategy.position_size <=0
        strategy.entry("3 Bar Long", strategy.long, when=threeBarSetupBull)
        sl :=low[1]
    if threeBarSetupBear and strategy.position_size >=0
        strategy.entry("3 Bar Short", strategy.short, when=threeBarSetupBull)
        sl :=high[1]
    if fourBarSetupBull and strategy.position_size <=0
        strategy.entry("4 Bar Long", strategy.long, when=fourBarSetupBull)
        sl :=min(low[1], low[2])
    if fourBarSetupBear and strategy.position_size >=0
        strategy.entry("4 Bar Short", strategy.short, when=fourBarSetupBear)
        sl :=max(high[1], high[2])

if sl !=0.0
    if strategy.position_size > 0
        tp := strategy.position_avg_price + ((strategy.position_avg_price - sl) * profitMultiplier)
        strategy.exit(id="Exit", limit=tp, stop=sl)

    if strategy.position_size < 0
        tp := strategy.position_avg_price - ((sl - strategy.position_avg_price) * profitMultiplier)
        strategy.exit(id="Exit", limit=tp, stop=sl)