
এই কৌশলটি একাধিক মুভিং এভারেজ (VWMA), গড় দিকনির্দেশক সূচক (ADX) এবং গতিশীল সূচক (DMI) ব্যবহার করে বিটকয়েন বাজারে একাধিক সুযোগ ক্যাপচার করে। দামের গতিশীলতা, প্রবণতা দিকনির্দেশ এবং লেনদেনের পরিমাণের মতো একাধিক প্রযুক্তিগত সূচকগুলির সমন্বয় করে, কৌশলটি উচ্চতর প্রবণতার শক্তিশালী এবং পর্যাপ্ত পরিমাণে প্রবেশের জায়গা খুঁজে বের করার লক্ষ্যে, ঝুঁকিগুলি কঠোরভাবে নিয়ন্ত্রণ করে।
ভিডাব্লুএমএ-এডিএক্স বিটকয়েন মাল্টিহেড কৌশলটি মূল্যের প্রবণতা, গতিশীলতা এবং লেনদেনের পরিমাণের মতো একাধিক প্রযুক্তিগত সূচককে সমন্বিতভাবে বিবেচনা করে বিটকয়েন বাজারের উত্থানের সুযোগকে আরও কার্যকরভাবে ক্যাপচার করতে সক্ষম। একই সাথে, কঠোর ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা এবং পরিষ্কার পজিশনের শর্তগুলি এই কৌশলটির ঝুঁকিকে আরও ভালভাবে নিয়ন্ত্রণে রাখে। তবে, এই কৌশলটির কিছু সীমাবদ্ধতা রয়েছে, যেমন বাজারের পরিবেশের পরিবর্তনগুলির জন্য অনুকূলতা অভাব এবং ক্ষতির কৌশলটি অপ্টিমাইজ করা দরকার। ভবিষ্যতে সংকেতের নির্ভরযোগ্যতা, ঝুঁকি নিয়ন্ত্রণ, প্যারামিটার অপ্টিমাইজেশন ইত্যাদি থেকে শুরু করে কৌশলটির স্থিতিশীলতা এবং লাভজনকতা আরও বাড়ানো যেতে পারে। সামগ্রিকভাবে, ভিডাব্লুএমএ-এডিএক্স বিটকয়েন মাল্টিহেড কৌশলটি বিনিয়োগকারীদের একটি গতিশীল এবং প্রবণীর উপর ভিত্তি করে ব্যবস্থামূলক লেনদেনের উপায় সরবরাহ করে, যা আরও অনুসন্ধান এবং উন্নত করার জন্য মূল্যবান।
/*backtest
start: 2024-03-01 00:00:00
end: 2024-03-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Q_D_Nam_N_96
//@version=5
strategy("Long BTC Strategy", overlay=true,
default_qty_type = strategy.percent_of_equity,
default_qty_value = 100, initial_capital = 1000, currency = currency.USD)
Volume_Quartile(vol) =>
qvol1 = ta.percentile_linear_interpolation(vol, 60,15)
qvol2 = ta.percentile_linear_interpolation(vol, 60,95)
vol > qvol1 and vol < qvol2
smma(src, length) =>
smma = 0.0
smma := na(smma[1]) ? ta.sma(src, length) : (smma[1] * (length - 1) + src) / length
smma
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"RMA" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
"HMA" => ta.hma(source, length)
"SMMA" => smma(source, length)
DMI(len, lensig) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
trur = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / trur)+11
minus = fixnan(100 * ta.rma(minusDM, len) / trur)-11
sum = plus + minus
adx = 100 * ta.vwma(math.abs(plus - minus-11) / (sum == 0 ? 1 : sum), lensig)
[adx, plus, minus]
cond1 = Volume_Quartile(volume*hlcc4)
ma1 = ma(close,9, "VWMA")
// plot(ma1, color = color.blue)
ma2 = ma(close,14, "VWMA")
// plot(ma2, color = color.orange)
n = switch timeframe.period
"240" => 0.997
=> 0.995
ma3 = (0.1*ma(ta.highest(close,89),89, "VWMA") +
0.9*ma(ta.lowest(close,89),89, "VWMA"))*n
plot(ma3, color = color.white)
[adx, plus, minus] = DMI(7, 10)
cond2 = adx > 18 and plus - math.abs(minus) > 15
var int count = 0
if barstate.isconfirmed and strategy.position_size != 0
count += 1
else
count := 0
p_roc = 0
if timeframe.period == '240'
p_roc := 14
else
p_roc := 10
longCondition = ta.crossover(ma1, ma2) and (close > open ? close > ma3 : open > ma3) and ((ma3 - ma3[1])*100/ma3[1] >= -0.2) and ((close-close[p_roc])*100/close[p_roc] > -2.0)
float alpha = 0.0
float sl_src = high[1]
if (longCondition and cond1 and cond2 and strategy.position_size == 0)
strategy.entry("buy", strategy.long)
if timeframe.period == '240'
alpha := 0.96
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+5, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == '30'
alpha := 0.985
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == '45'
alpha := 0.985
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == '60'
alpha := 0.98
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == '120'
alpha := 0.97
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == '180'
alpha := 0.96
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else if timeframe.period == 'D'
alpha := 0.95
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
else
alpha := 0.93
strategy.exit("exit-buy","buy", stop = sl_src*alpha)
// line.new(bar_index, sl_src*alpha, bar_index+20, sl_src*alpha, width = 2, color = color.white)
period = switch timeframe.period
"240" => 90
"180" => 59
"120" => 35
"30" => 64
"45" => 40
"60" => 66
"D" => 22
=> 64
if (count > period or close < ma3)
strategy.close('buy', immediately = true)