তিন বার এবং চার বার ব্রেকআউট বিপরীত কৌশল

লেখক:চাওঝাং, তারিখঃ ২০২৩-১২-১৮ ১০ঃ৩৯ঃ৫৩
ট্যাগঃ

img

সারসংক্ষেপ

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

কৌশলগত যুক্তি

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

  1. বড় পরিসরের বারগুলি (গ্যাপ বারগুলি) স্বীকৃতি দিনঃ 1.5 x এটিআর বিরতি, 65% এর বেশি শরীরের শতাংশ সহ। এগুলিকে শক্তিশালী গতিশীল বলে মনে করা হয়।

  2. নিম্ন-পরিসীমা বারগুলি সনাক্ত করুন (সংগ্রাহক বারগুলি): গ্যাপ বারগুলির পরে এক বা দুটি পরবর্তী ছোট-পরিসীমা বার, গ্যাপ বারগুলির কাছাকাছি উচ্চ / নিম্ন স্তরের সাথে। তারা ধীর গতি এবং একীকরণের প্রতিনিধিত্ব করে, সমর্থন / প্রতিরোধের স্তর গঠন করে।

  3. বিপরীত সিগন্যাল বারগুলি সনাক্ত করুনঃ যদি একটি বার সংহতকরণের পরে পূর্ববর্তী বারগুলির উচ্চ / নিম্নের মধ্য দিয়ে ভেঙে যায় তবে এটি বিপরীত সিগন্যাল হিসাবে বিবেচিত হতে পারে। আমরা সিগন্যাল বারটির দিকের ভিত্তিতে অবস্থান গ্রহণ করি।

  4. স্টপ লস এবং লাভ নিনঃ গ্যাপ বারের নিম্ন/উচ্চ পয়েন্টের নীচে/উপরে স্টপ লস সেট করুন। ঝুঁকি-পুরষ্কার অনুপাতকে স্টপ লস দূরত্বের সাথে গুণ করে লাভ নিন।

সুবিধা বিশ্লেষণ

এই কৌশলটির প্রধান সুবিধাগুলি হল:

  1. অপরিশোধিত মূল্যের ক্রিয়াকলাপ ব্যবহার করে প্রবণতা এবং বিপরীততা চিহ্নিত করুন, কোনও সূচকের প্রয়োজন নেই।

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

  3. শরীরের দ্বারা বিপরীত বারের বিচার মিথ্যা সংকেত হ্রাস করে।

  4. প্রতিটি ট্রেডে মাত্র ৩-৪ বার লাগে।

  5. স্টপ লস এবং লাভ নেওয়ার স্পষ্ট নিয়ম ঝুঁকি ব্যবস্থাপনাকে সহজ করে তোলে।

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

প্রধান ঝুঁকিঃ

  1. প্যারামিটার সেটিংসের উপর নির্ভর করে। লস প্যারামিটার মিথ্যা সংকেত এবং হারানো ব্যবসা বৃদ্ধি করে।

  2. ভুয়া ব্রেকআউটের জন্য দুর্বল এবং সমস্ত মিথ্যা সংকেত ফিল্টার করতে অক্ষম।

  3. ব্যর্থ পরাজয়ের প্রয়াসের পর একত্রীকরণের ফাঁদে পড়ার ঝুঁকি। এ ধরনের ক্ষেত্রে ক্ষতি কমানো কঠিন।

  4. বড় স্টপ লস রেঞ্জের অর্থ ফাঁদে পড়ার সময় বড় ক্ষতি।

ঝুঁকি কমাতেঃ

  1. গ্যাপ বার এবং সংগ্রহের বার সনাক্তকরণের জন্য পরামিতিগুলি অনুকূল করুন।

  2. পজিশন প্রবেশের আগে নিশ্চিতকরণ বার মত ফিল্টার যোগ করুন।

  3. স্টপ লস অ্যালগরিদমকে আরও অভিযোজিত করার জন্য অপ্টিমাইজ করুন।

অপ্টিমাইজেশান নির্দেশাবলী

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

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

  2. মুভিং মিডিয়ার সাথে মিশ্রিত করুন, কেবলমাত্র যখন মূল এমএ স্তরগুলি ভেঙে যায় তখনই সংকেত গ্রহণ করুন।

  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)

আরো