বোলিংজার ব্যান্ড ট্রেন্ড বিপরীত কৌশল

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

img

সারসংক্ষেপ

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

যুক্তি

কৌশল দুটি প্রবেশ সংকেত চিহ্নিত করেঃ

  1. লং সিগন্যালঃ যখন ইএমএ লাইনের ঊর্ধ্বে থাকাকালীন বন্ধের দাম নিম্ন স্তরের ব্যাণ্ডে পৌঁছায়, তখন পূর্ববর্তী মোমবাতিটি হ্রাসপ্রাপ্ত ছিল এবং বর্তমান মোমবাতিটি উত্থানমুখী।

  2. সংক্ষিপ্ত সংকেতঃ যখন EMA লাইনের নিচে থাকা অবস্থায় বন্ধের মূল্য উপরের ব্যাংকে পৌঁছায়, তখন পূর্ববর্তী মোমবাতিটি উত্থানমুখী ছিল এবং বর্তমান মোমবাতিটি হ্রাসমুখী।

স্টপ লস ফিক্সড স্টপ লস ব্যবহার করে। স্টপ লস স্তরটি প্রবেশ মূল্যের সাথে / বিয়োগ ঝুঁকি / পুরষ্কার অনুপাতের সাথে প্রবেশ মূল্য এবং লাভের স্তরের মধ্যে দূরত্বের সাথে সেট করা হয়।

টেক লাভ গতিশীল টেক লাভ ব্যবহার করে। লং টেক লাভ নিম্ন ব্যান্ডে সেট করা হয়। শর্ট টেক লাভ উপরের ব্যান্ডে সেট করা হয়

সুবিধা

  1. প্রবণতা অনুসরণ এবং গড় বিপরীতমুখী উভয় কৌশলগুলির শক্তি একত্রিত করে, পরিসীমা সীমাবদ্ধ বাজারে ভাল পারফর্ম করে।

  2. ওভারকুপ এবং ওভারসোল্ড স্তর চিহ্নিত করতে বোলিংজার ব্যান্ড ব্যবহার করে, বিপরীত সংকেতগুলির নির্ভুলতা উন্নত করে।

  3. স্থির স্টপ লস ঝুঁকি ব্যবস্থাপনাকে সহজ করে তোলে।

  4. ডায়নামিক লভ্যাংশ গ্রহণ লাভের সর্বাধিকীকরণের অনুমতি দেয়।

ঝুঁকি

  1. ব্রেকআউট কৌশলগুলি রান বন্ধ করার জন্য সংবেদনশীল।

  2. যখন বাজার খুব অস্থির হয় তখন ঘন ঘন স্টপ লস ট্রিগার হয়।

  3. ফিক্সড স্টপ লস বাজার অস্থিরতার সাথে মানিয়ে নিতে পারে না।

  4. বোলিংজার ব্যান্ডের প্যারামিটার মিটুনিং খারাপ হলে ফলাফল খারাপ হতে পারে।

উন্নতকরণ

  1. প্রবেশ সংকেতগুলি ফিল্টার করতে RSI সূচক অন্তর্ভুক্ত করুন। উদাহরণস্বরূপ, যদি RSI 50 এর উপরে থাকে তবে কেবল দীর্ঘ যান এবং যদি RSI 50 এর নীচে থাকে তবে কেবল শর্ট যান। এটি খারাপ সংকেতগুলি এড়ায়।

  2. এডাপ্টিভ স্টপ লস বাস্তবায়ন করুন যা অস্থিরতার উপর ভিত্তি করে স্টপ দূরত্ব সামঞ্জস্য করে। উদাহরণস্বরূপ, গতিশীল স্টপ লস সেট করতে এটিআর ব্যবহার করুন।

  3. সেরা প্যারামিটার সমন্বয় খুঁজে পেতে বোলিংজার ব্যান্ডের পরামিতিগুলি অপ্টিমাইজ করুন।

  4. EMA এর সাপোর্ট/রেসিস্ট্যান্স এফেক্ট বাড়ানোর জন্য বিভিন্ন EMA সময়ের পরীক্ষা করুন।

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

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


/*backtest
start: 2023-10-24 00:00:00
end: 2023-10-31 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4

// Welcome to yet another script. This script was a lot easier since I was stuck for so long on the Donchian Channels one and learned so much from that one that I could use in this one
// This code should be a lot cleaner compared to the Donchian Channels, but we'll leave that up to the pro's
// This strategy has two entry signals, long = when price hits lower band, while above EMA, previous candle was bearish and current candle is bullish
// Short = when price hits upper band, while below EMA, previous candle was bullish and current candle is bearish
// Take profits are the opposite side's band(lower band for long signals, upper band for short signals). This means our take profit price will change per bar
// Our stop loss doesn't change, it's the difference between entry price and the take profit target divided by the input risk reward
// At the time of writing this, I could probably calculate that much easier by simply multiplying the opposite band by the input risk reward ratio
// Since I want to get this script out and working on the next one, I won't clean that up, I'm sorry
// strategy(shorttitle="BB Trending Reverse Strategy", title="Bollinger Bands Trending Reverse Strategy", overlay=true, default_qty_type = strategy.cash, default_qty_value = 150, initial_capital = 1000, currency = currency.USD, commission_type = "percent", commission_value = 0.036)

// The built-in Bollinger Band indicator inputs and variables, added some inputs of my own and organised the code
length              = input(20, minval=1)
src                 = input(close, title="Source")
mult                = input(2.0, minval=0.001, maxval=50, title="StdDev")
emaInput            = input(title = "EMA Input", type = input.integer, defval = 200, minval = 10, maxval = 400, step = 1)
riskreward          = input(title = "Risk/Reward Ratio", type = input.float, defval = 1.50, minval = 0.01, maxval = 100, step = 0.01)
offset              = input(0, "Offset", type = input.integer, minval = -500, maxval = 500)
basis               = sma(src, length)
dev                 = mult * stdev(src, length)
upper               = basis + dev
lower               = basis - dev
ema                 = ema(close, emaInput)

// These are our conditions as explained above
entryLong           = low[1] <= lower[1] and low <= lower and low > ema
entryShort          = high[1] >= upper[1] and high >= upper and high < ema
reversecandleLong   = close > open and close[1] < open[1]
reversecandleShort  = close < open and close[1] > open[1]
var stopLong        = 0.0
var stopShort       = 0.0

// These are our entry signals, notice how the stop condition is within the if statement while the strategy.exit is outside of the if statement, this way the take profit targets trails up or down depending on what the price does
if reversecandleLong and entryLong and strategy.position_size == 0
    stopLong := (((close / upper - 1) * riskreward + 1) * close)
    strategy.entry("Long Entry", strategy.long, comment = "Long Entry")
    
strategy.exit("Exit Long", "Long Entry", limit = upper, stop = stopLong, comment = "Exit Long")

if reversecandleShort and entryShort and strategy.position_size == 0
    stopShort := (((close / lower - 1) / riskreward + 1) * close)
    strategy.entry("Short Entry", strategy.short, comment = "Short Entry")

strategy.exit("Exit Short", "Short Entry", limit = lower, stop = stopShort, comment = "Exit Short")


// The built-in Bollinger Band plots
plot(basis, "Basis", color=#872323, offset = offset)
p1 = plot(upper, "Upper", color=color.teal, offset = offset)
p2 = plot(lower, "Lower", color=color.teal, offset = offset)
fill(p1, p2, title = "Background", color=#198787, transp=95)
plot(ema, color=color.red)

// These plots are to check the stoplosses, they can  make a mess of your chart so only use these if you want to make sure these work
// plot(stopLong)
// plot(stopShort)

আরো