
এটি একটি স্বনির্ধারিত ট্রেডিং কৌশল যা VWAP এবং Garman-Klass ওঠানামার উপর ভিত্তি করে তৈরি করা হয়। এই কৌশলটি ওঠানামার গতিশীলতার সাথে VWAP এর স্ট্যান্ডার্ড ডিফারেনশিয়াল ব্যাপ্তিকে সামঞ্জস্য করে এবং বাজারের প্রবণতা সম্পর্কে বুদ্ধিমান ট্র্যাকিং সক্ষম করে। যখন দামটি উঁচুতে উঠে যায় তখন পজিশন খোলার জন্য বেশি এবং নীচে যাওয়ার সময় পজিশন খোলার জন্য, ওঠানামার হার যত বেশি হবে ততই উঁচু হবে এবং ওঠানামার হার যত কম হবে ততই উঁচু হবে।
কৌশলটির কেন্দ্রবিন্দু হল ভিডাব্লুএপি এবং জিকেভি অস্থিরতার সাথে মিলিত হওয়া। প্রথমে ভিডাব্লুএপিকে মূল্যের কেন্দ্র হিসাবে গণনা করা হয়, তারপরে বন্ধের দামের স্ট্যান্ডার্ড ডিফারেনশিয়াল ব্যবহার করে একটি ব্যাপ্তি তৈরি করা হয়। মূল বিষয়টি হ’ল জিকেভি সূত্র ব্যবহার করে অস্থিরতা গণনা করা, যা চারটি দামের উত্থান ও পতনের বিষয়টি বিবেচনা করে, যা traditionalতিহ্যবাহী অস্থিরতার চেয়ে আরও নির্ভুল। অস্থিরতা গতিশীলভাবে ব্যাপ্তি প্রস্থকে সামঞ্জস্য করে - যখন অস্থিরতা বৃদ্ধি পায়, তখন ব্যাপ্তি প্রসারিত হয়, বিপরীত থ্রেশহোল্ড বাড়ায়; যখন অস্থিরতা হ্রাস পায়, তখন ব্যাপ্তি সংকীর্ণ হয়, বিপরীত থ্রেশহোল্ডকে হ্রাস করে। এই অভিযোজিত প্রক্রিয়াটি কার্যকরভাবে মিথ্যা বিপর্যয় এড়াতে পারে।
এই কৌশলটি ভিডাব্লুএপি এবং জিকেভি ওঠানামা হারের উদ্ভাবনের সাথে একত্রিত করে বাজারের গতিশীলতা অনুসরণ করে। এর স্বনির্ধারিত বৈশিষ্ট্যগুলি বিভিন্ন বাজার পরিবেশে স্থিতিশীল পারফরম্যান্স বজায় রাখতে সক্ষম করে। যদিও কিছু সম্ভাব্য ঝুঁকি রয়েছে, তবে যুক্তিসঙ্গত ঝুঁকি নিয়ন্ত্রণ এবং ক্রমাগত অপ্টিমাইজেশনের মাধ্যমে কৌশলটির ভাল ব্যবহারের সম্ভাবনা রয়েছে।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-18 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Adaptive VWAP Bands with Garman Klass Volatility", overlay=true)
// Inputs
length = input.int(25, title="Volatility Length")
vwapLength = input.int(14, title="VWAP Length")
vol_multiplier = input.float(1,title="Volatility Multiplier")
// Function to calculate Garman-Klass Volatility
var float sum_gkv = na
if na(sum_gkv)
sum_gkv := 0.0
sum_gkv := 0.0
for i = 0 to length - 1
sum_gkv := sum_gkv + 0.5 * math.pow(math.log(high[i]/low[i]), 2) - (2*math.log(2)-1) * math.pow(math.log(close[i]/open[i]), 2)
gcv = math.sqrt(sum_gkv / length)
// VWAP calculation
vwap = ta.vwma(close, vwapLength)
// Standard deviation for VWAP bands
vwapStdDev = ta.stdev(close, vwapLength)
// Adaptive multiplier based on GCV
multiplier = (gcv / ta.sma(gcv, length)) * vol_multiplier
// Upper and lower bands
upperBand = vwap + (vwapStdDev * multiplier)
lowerBand = vwap - (vwapStdDev * multiplier)
// Plotting VWAP and bands
plot(vwap, title="VWAP", color=color.blue, linewidth=2)
plot(upperBand, title="Upper Band", color=color.green, linewidth=1)
plot(lowerBand, title="Lower Band", color=color.red, linewidth=1)
var barColor = color.black
// Strategy: Enter long above upper band, go to cash below lower band
if (close > upperBand)
barColor := color.green
strategy.entry("Long", strategy.long)
else if (close < lowerBand)
barColor := color.fuchsia
strategy.close("Long")
barcolor(barColor)