অ্যাডাপ্টিভ বোটভেনকো সূচক দীর্ঘ স্বল্প কৌশল

লেখক:চাওঝাং, তারিখঃ 2024-01-04 16:09:30
ট্যাগঃ

img

সারসংক্ষেপ

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

কৌশল নীতি

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

উপরন্তু, কৌশলটি একটি EMA সুরক্ষা বেল্ট একত্রিত করে যা 21 দিনের, 55 দিনের এবং অন্যান্য চলমান গড়ের সমন্বয়ে গঠিত। এটি নির্ধারণ করে যে বর্তমান অবস্থাটি এই চলমান গড়ের শ্রেণিবদ্ধকরণের সম্পর্কের উপর ভিত্তি করে একটি ষাঁড় বা বাঘ বা সংহতকরণ বাজার কিনা, এবং সেই অনুযায়ী স্বল্প বা দীর্ঘ অপারেশন সীমাবদ্ধ করে।

বোটভেনকো সূচক দিয়ে ট্রেডিং সিগন্যাল চিহ্নিত করে এবং চলমান গড়ের সাথে বাজারের পর্যায়গুলি বিচার করে, যখন একসাথে ব্যবহার করা হয় তখন অনুপযুক্ত অবস্থান প্রতিষ্ঠা এড়ানো যায়।

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

এই কৌশলটির সবচেয়ে বড় সুবিধা হ'ল এটি স্বয়ংক্রিয়ভাবে বাজারের দীর্ঘ / সংক্ষিপ্ত প্রবণতা সনাক্ত করতে পারে। বোটভেনকো সূচকটি দুটি সময়কালের দামের মধ্যে পার্থক্যের জন্য খুব সংবেদনশীল এবং দ্রুত মূল সমর্থন / প্রতিরোধের স্তরগুলি সনাক্ত করতে পারে। একই সাথে, চলমান গড়ের বাছাই কার্যকরভাবে বিচার করতে পারে যে বর্তমানে দীর্ঘ বা সংক্ষিপ্ত হওয়া ভাল কিনা।

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

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

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

প্রথম ঝুঁকি মোকাবেলা করার জন্য, বোটভেনকো সূচকের পরামিতিগুলি গণনার চক্র বাড়ানোর জন্য এবং অপ্রয়োজনীয় ট্রেডগুলি হ্রাস করার জন্য সামঞ্জস্য করা যেতে পারে। দ্বিতীয় ঝুঁকির জন্য, প্রবণতা বিচারকে আরও নির্ভুল করার জন্য আরও চলমান গড় যোগ করা যেতে পারে।

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

প্রধান অপ্টিমাইজেশান দিকগুলি হল প্যারামিটার টিউনিং এবং ফিল্টার শর্ত যোগ করা।

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

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

সংক্ষিপ্তসার

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


/*backtest
start: 2023-12-27 00:00:00
end: 2024-01-03 00:00:00
period: 1m
basePeriod: 1m
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/
// © boftei

//@version=5

strategy("Boftei's Strategy", overlay=false, pyramiding=1, default_qty_type= strategy.percent_of_equity, default_qty_value = 100, calc_on_order_fills=false, margin_long = 100, margin_short = 100, slippage=0, commission_type=strategy.commission.percent, commission_value = 0, initial_capital = 40, precision = 6)
strat_dir_input = input.string("all", "strategy direction", options=["long", "short", "all"])
strat_dir_value = strat_dir_input == "long" ? strategy.direction.long : strat_dir_input == "short" ? strategy.direction.short : strategy.direction.all
strategy.risk.allow_entry_in(strat_dir_value)
//////////////////////////////////////////////////////////////////////
//DATA
testStartYear = input(2005, "Backtest Start Year")
testStartMonth = input(7, "Backtest Start Month")
testStartDay = input(16, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,0,0)
//Stop date if you want to use a specific range of dates
testStopYear = input(2030, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(30, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,0,0)


testPeriod() =>
    time >= testPeriodStart and time <= testPeriodStop ? true : false
//////////////////////////////////////////////////////////////////////
sell = input.float(0.0065, "sell level")
buy = input.float(0, "buy level")
long1 = input.float(-0.493, "long retry - too low")
long2 = input.float(2, "long close up")
long3 = input.float(-1.5, "long close down")
short1 = input.float(1.26, "short retry - too high")
short2 = input.float(-5, "dead - close the short")
///< botvenko script
nn = input(60, "Histogram Period")
float x = 0
float z = 0
float k = 0



y = math.log(close[0]) - math.log(close[nn])
if y>0
    x := y
else
    k := y
//---------------------------------------------
        
plot(y > 0 ? x: 0, color = color.green, linewidth = 4)
plot(y <= 0 ? k: 0, color = color.maroon, linewidth = 4)
plot(y, color = color.yellow, linewidth = 1)

co = ta.crossover(y, buy)
cu = ta.crossunder(y, sell)
retry_long = ta.crossunder(y, long1)
deadline_long_up = ta.crossover(y, long2)
deadline_long_down = ta.crossunder(y, long3)
retry_short = ta.crossover(y, short1)
deadline_short = ta.crossunder(y, short2)


hline(buy, title='buy', color=color.green, linestyle=hline.style_dotted, linewidth=2)
hline(0, title='zero', color=color.white, linestyle=hline.style_dotted, linewidth=1)
hline(sell, title='sell', color=color.red, linestyle=hline.style_dotted, linewidth=2)
hline(long1, title='long retry', color=color.blue, linestyle=hline.style_dotted, linewidth=2)
hline(long2, title='overbought', color=color.teal, linestyle=hline.style_dotted, linewidth=2)
hline(long3, title='oversold', color=color.maroon, linestyle=hline.style_dotted, linewidth=2)
hline(short1, title='short retry', color=color.purple, linestyle=hline.style_dotted, linewidth=2)
hline(short2, title='too low to short - an asset may die', color=color.navy, linestyle=hline.style_dotted, linewidth=2)


////////////////////////////////////////////////////////////EMAprotectionBLOCK
ema_21 = ta.ema(close, 21)
ema_55 = ta.ema(close, 55)
ema_89 = ta.ema(close, 89)
ema_144 = ta.ema(close, 144)
//ema_233 = ta.ema(close, 233)
// ema_377 = ta.ema(close, 377)

long_st = ema_21>ema_55 and ema_55>ema_89 and ema_89>ema_144 //and ema_144>ema_233 and ema_233>ema_377
short_st = ema_21<ema_55 and ema_55<ema_89 and ema_89<ema_144 //and ema_144<ema_233 and ema_233<ema_377 

g_v = long_st == true?3:0
r_v = short_st == true?-2:0
y_v = long_st != true and short_st != true?2:0

plot(math.log(ema_21), color = color.new(#ffaf5e, 50))
plot(math.log(ema_55), color = color.new(#b9ff5e, 50))
plot(math.log(ema_89), color = color.new(#5eff81, 50))
plot(math.log(ema_144), color = color.new(#5effe4, 50))
//plot(math.log(ema_233), color = color.new(#5e9fff, 50))
//plot(math.log(ema_377), color = color.new(#af5eff, 50))

plot(long_st == true?3:0, color = color.new(color.green, 65), linewidth = 5)
plot(short_st == true?-2:0, color = color.new(color.red, 65), linewidth = 5)
plot(long_st != true and short_st != true?2:0, color = color.new(color.yellow, 65), linewidth = 5)
////////////////////////////////////////////////////////////EMAprotectionBLOCK




if (co and testPeriod() and (g_v == 3 or y_v == 2))
    strategy.close("OH BRO", comment = "EXIT-SHORT")
    strategy.close("OH DUDE", comment = "EXIT-SHORT")
	strategy.entry("OH DAMN", strategy.long, comment="ENTER-LONG 'co'")
if (retry_long and testPeriod() and (g_v == 3 or y_v == 2))
    strategy.close("OH DAMN", comment = "EXIT-LONG")
    strategy.entry("OH BRUH", strategy.long, comment="ENTER-LONG 'retry_long'")
	
if (cu and testPeriod() and (r_v == -2 or y_v == 2))
    strategy.close("OH DAMN", comment = "EXIT-LONG")
    strategy.close("OH BRUH", comment = "EXIT-LONG")
	strategy.entry("OH BRO", strategy.short, comment="ENTER-SHORT 'cu'")
if (retry_short and testPeriod() and (r_v == -2 or y_v == 2))
    strategy.close("OH BRO", comment = "EXIT-SHORT")
    strategy.entry("OH DUDE", strategy.short, comment="ENTER-SHORT 'retry_short'")
	
    
if (deadline_long_up and testPeriod() or r_v == -2 and testPeriod())
    strategy.close("OH DAMN", comment = "EXIT-LONG 'deadline_long_up'")
if (deadline_long_down and testPeriod())
    strategy.close("OH DAMN", comment = "EXIT-LONG 'deadline_long_down'")
if (deadline_short and testPeriod() or g_v == 3 and testPeriod())
    strategy.close("OH BRO", comment = "EXIT-SHORT 'deadline_short'")
    // (you can use strategy.close_all(comment = "close all entries") here)



আরো