ভিডব্লিউএপি ভিত্তিক বোলিংজার ব্যান্ড ব্রেকআউট কৌশল

লেখক:চাওঝাং, তারিখঃ 2024-02-06 14:36:26
ট্যাগঃ

img

সারসংক্ষেপ

এই কৌশলটি ভিডাব্লুএপি ট্র্যাক করার জন্য বোলিংজার ব্যান্ড ব্যবহার করে। এটি একটি দীর্ঘ অবস্থান গ্রহণ করে যখন ভিডাব্লুএপি মাঝারি ব্যান্ডের উপরে ভাঙ্গবে এবং ভিডাব্লুএপি নীচের ব্যান্ডের নীচে ভাঙ্গলে অবস্থান বন্ধ করে দেয়। পিভট পয়েন্টটি ভুয়া ব্রেকআউটগুলি এড়াতে প্রবেশের জন্য একটি সহায়ক সংকেত হিসাবেও ব্যবহৃত হয়।

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

  1. ভিডব্লিউএপি গণনা করুন।
  2. VWAP এর Bollinger Bands, যার মধ্যে উপরের, মাঝের এবং নীচের Bands অন্তর্ভুক্ত।
  3. যখন VWAP মাঝারি ব্যান্ডের উপরে ভেঙে যায় এবং দাম পিভট পয়েন্টের উপরে থাকে তখন লং পজিশন নিন।
  4. স্টপ লস ৫% এ সেট করুন।
  5. যদি ভিডাব্লুএপি নীচের ব্যান্ডের নিচে ভেঙে যায়, তাহলে লং পজিশন বন্ধ করুন। যদি স্টপ লস ট্রিগার হয়, তাহলেও বেরিয়ে আসুন।

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

  1. ভিডব্লিউএপিতে ট্রেন্ড ট্র্যাকিংয়ের ক্ষমতা রয়েছে।
  2. পিভট পয়েন্ট যোগ করা মিথ্যা ব্রেকআউট ফিল্টার করে, অপ্রয়োজনীয় ক্ষতি এড়ায়।
  3. কিছু মুনাফা আংশিকভাবে বন্ধ হয়ে যায় এবং ঝুঁকি নিয়ন্ত্রণ করে।
  4. ব্যাকটেস্টগুলি ভাল স্থিতিশীলতার সাথে ষাঁড়ের বাজারে দুর্দান্ত পারফরম্যান্স দেখায়।

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

  1. ব্যাপ্তিভিত্তিক বাজারে মিথ্যা ব্রেকআউটের কারণে ক্ষতির ঝুঁকিতে রয়েছে।
  2. পিভট পয়েন্টগুলি সম্পূর্ণরূপে মিথ্যা সংকেতগুলি এড়াতে পারে না। আরও ফিল্টার প্রয়োজন।
  3. ব্যবসায়ের ঘন ঘন বৃদ্ধির ফলে লেনদেনের খরচ বেশি হয়।
  4. ভাল ঝুঁকি নিয়ন্ত্রণের প্রয়োজন।

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

  1. সিগন্যাল ফিল্টার করার জন্য MACD, KDJ এর মত সূচক যোগ করুন।
  2. ব্যাকটেস্টের মাধ্যমে বিবি প্যারামিটার অপ্টিমাইজ করুন।
  3. মেশিন লার্নিং ব্যবহার করে বিবি পরামিতিগুলিকে গতিশীলভাবে অপ্টিমাইজ করুন।
  4. সর্বোত্তম খুঁজে পেতে বিভিন্ন স্টপ লস স্তর পরীক্ষা করুন।
  5. বাজারের অস্থিরতার উপর ভিত্তি করে অভিযোজিত লাভ গ্রহণ করুন।

সিদ্ধান্ত

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


/*backtest
start: 2024-01-06 00:00:00
end: 2024-02-05 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/
// © ediks123

//@version=4
strategy("BBofVWAP with entry at Pivot Point", overlay=false, pyramiding=1,   default_qty_type=strategy.percent_of_equity,  default_qty_value=20, initial_capital=10000, currency=currency.USD)  //default_qty_value=10, default_qty_type=strategy.fixed,

// Function outputs 1 when it's the first bar of the D/W/M/Y
is_newbar(res) =>
    ch = 0
    if(res == 'Y')
        t  = year(time('D'))
        ch := change(t) != 0 ? 1 : 0
    else
        t = time(res)
        ch := change(t) != 0 ? 1 : 0
    ch


//variables BEGIN
//smaLength=input(200,title="Slow MA Length")

bbLength=input(50,title="BB Length")  
//bbsrc = input(close, title="BB Source")
mult = input(2.0, minval=0.001, maxval=50, title="StdDev")
offset = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)

pp_period = input(title = "Pivot Period", type=input.string, defval="Week", options = ['Day', 'Week'])

pp_res = pp_period == 'Day' ? 'D' : pp_period == 'Week' ? 'W' : pp_period == 'Month' ? 'M' : 'Y' 

riskCapital = input(title="Risk % of capital", defval=10, minval=1)
stopLoss=input(5,title="Stop Loss",minval=1)



//sma200=sma(close,smaLength)
//plot(sma200, title="SMA 200", color=color.orange)

myVwap=vwap(hlc3)

//bollinger calculation
basis = sma(myVwap, bbLength)
dev = mult * stdev(myVwap, bbLength)
upperBand = basis + dev
lowerBand = basis - dev

//plot bb
plot(basis, "Basis", color=color.teal, style=plot.style_circles , offset = offset)
p1 = plot(upperBand, "Upper", color=color.teal, offset = offset)
p2 = plot(lowerBand, "Lower", color=color.teal, offset = offset)
fill(p1, p2, title = "Background", color=color.teal, transp=95)

plot(myVwap, title="VWAP", color=color.purple)


//pivot points 


// Calc High
high_cur = 0.0
high_cur := is_newbar(pp_res) ? high : max(high_cur[1], high)

phigh = 0.0
phigh := is_newbar(pp_res) ? high_cur[1] : phigh[1]

// Calc Low
low_cur = 0.0
low_cur := is_newbar(pp_res) ? low : min(low_cur[1], low)

plow = 0.0
plow := is_newbar(pp_res) ? low_cur[1] : plow[1]

// Calc Close
pclose = 0.0
pclose := is_newbar(pp_res) ? close[1] : pclose[1]


vPP = (phigh + plow + pclose) / 3

//pivot points


//Entry--
//Echeck how many units can be purchased based on risk manage ment and stop loss
qty1 = (strategy.equity  * riskCapital / 100 ) /  (close*stopLoss/100)  

//check if cash is sufficient  to buy qty1  , if capital not available use the available capital only
qty1:= (qty1 * close >= strategy.equity ) ? (strategy.equity / close) : qty1


strategy.entry(id="BB_VWAP_PP",long=true, qty=qty1, when=   crossover(myVwap,basis)  and close>=vPP  )

bgcolor(strategy.position_size>=1?color.blue:na, transp=75)
barcolor(strategy.position_size>=1?color.green:na)

stopLossVal=  strategy.position_size>=1 ?  close * (1 - (stopLoss*0.01) ) : 0.00

//partial exit
//strategy.close(id="BBofVwap", qty=strategy.position_size/3, when=crossunder(myVwap,upperBand) and strategy.position_size>=1 )  //and close>strategy.position_avg_price)



//exit on lowerband or stoploss 
strategy.close(id="BB_VWAP_PP", comment="P" , qty=strategy.position_size/3, when= crossunder(myVwap,upperBand) and strategy.position_size>=1 and close>strategy.position_avg_price)  //
strategy.close(id="BB_VWAP_PP", comment="Exit All", when=crossunder(myVwap,lowerBand) and strategy.position_size>=1 )
//strategy.close(id="BBofVwapWithFibPivot", comment="Exit All", when=crossunder(close,vPP) and strategy.position_size>=1 )

strategy.close(id="BB_VWAP_PP", comment="Stop Loss Exit", when=crossunder(close,stopLossVal) and strategy.position_size>=1 )

আরো