
এই কৌশলটি একটি স্বনির্ধারিত ট্রেডিং সিস্টেম যা RSI (আপেক্ষিকভাবে দুর্বল) উপর ভিত্তি করে তৈরি করা হয়, যা ক্রমান্বয়ে ক্রয় ওভার ওভারসোল থ্রেশহোল্ডকে সামঞ্জস্য করে ট্রেডিং সিগন্যালের উত্পাদনকে অনুকূল করে তোলে। কৌশলটির মূল উদ্ভাবন হ’ল বুফি স্বনির্ধারিত থ্রেশহোল্ড (BAT) পদ্ধতির প্রবর্তন, যা বাজারের প্রবণতা এবং মূল্যের অস্থিরতার গতিশীলতার উপর ভিত্তি করে RSI এর ট্রিগার থ্রেশহোল্ডকে সামঞ্জস্য করে, যা প্রচলিত RSI কৌশলগুলির কার্যকারিতা বাড়ায়।
কৌশলটির মূল বিষয় হল ঐতিহ্যবাহী স্থির মূল্য হ্রাস RSI সিস্টেমকে একটি গতিশীল মূল্য হ্রাস সিস্টেমে আপগ্রেড করা। নিম্নলিখিত বাস্তবায়নগুলি হলঃ
এই কৌশলটিতে ঝুঁকি নিয়ন্ত্রণের জন্য দুটি পদ্ধতি রয়েছেঃ
এটি একটি উদ্ভাবনী স্ব-অনুকূলিতকরণ ট্রেডিং কৌশল যা গতিশীল হ্রাস অপ্টিমাইজেশনের মাধ্যমে traditionalতিহ্যবাহী আরএসআই কৌশলগুলির সীমাবদ্ধতাগুলি সমাধান করে। কৌশলটি সামগ্রিকভাবে বাজারের প্রবণতা এবং অস্থিরতা বিবেচনা করে এবং এর শক্তিশালী অভিযোজনযোগ্যতা এবং ঝুঁকি নিয়ন্ত্রণের ক্ষমতা রয়েছে। যদিও প্যারামিটার অপ্টিমাইজেশনের মতো চ্যালেঞ্জ রয়েছে, তবে ক্রমাগত উন্নতি ও অপ্টিমাইজেশনের মাধ্যমে কৌশলটি বাস্তব ব্যবসায়ের স্থিতিশীল পারফরম্যান্সের প্রত্যাশিত। ব্যবসায়ীদের রিয়েল-স্টোর ব্যবহারের আগে পর্যাপ্ত প্রতিক্রিয়া এবং প্যারামিটার অপ্টিমাইজেশনের পরামর্শ দেওয়া হয় এবং নির্দিষ্ট বাজারের বৈশিষ্ট্য অনুসারে যথাযথভাবে সামঞ্জস্য করা হয়।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-11 00:00:00
period: 1d
basePeriod: 1d
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/
// © PineCodersTASC
// TASC Issue: October 2024
// Article: Overbought/Oversold
// Oscillators: Useless Or Just Misused
// Article By: Francesco P. Bufi
// Language: TradingView's Pine Script™ v5
// Provided By: PineCoders, for tradingview.com
//@version=5
title ='TASC 2024.10 Adaptive Oscillator Threshold'
stitle = 'AdapThrs'
strategy(title, stitle, false, default_qty_type = strategy.percent_of_equity,
default_qty_value = 10, slippage = 5)
// --- Inputs ---
string sys = input.string("BAT", "System", options=["Traditional", "BAT"])
int rsiLen = input.int(2, "RSI Length", 1)
int buyLevel = input.int(14, "Buy Level", 0)
int adapLen = input.int(8, "Adaptive Length", 2)
float adapK = input.float(6, "Adaptive Coefficient")
int exitBars = input.int(28, "Fixed-Bar Exit", 1, group = "Strategy Settings")
float DSL = input.float(1600, "Dollar Stop-Loss", 0, group = "Strategy Settings")
// --- Functions ---
// Bufi's Adaptive Threshold
BAT(float price, int length) =>
float sd = ta.stdev(price, length)
float lr = ta.linreg(price, length, 0)
float slope = (lr - price[length]) / (length + 1)
math.min(0.5, math.max(-0.5, slope / sd))
// --- Calculations ---
float osc = ta.rsi(close, rsiLen)
// Strategy entry rules
// - Traditional system
if sys == "Traditional" and osc < buyLevel
strategy.entry("long", strategy.long)
// - BAT system
float thrs = buyLevel * adapK * BAT(close, adapLen)
if sys == "BAT" and osc < thrs
strategy.entry("long", strategy.long)
// Strategy exit rules
// - Fixed-bar exit
int nBar = bar_index - strategy.opentrades.entry_bar_index(0)
if exitBars > 0 and nBar >= exitBars
strategy.close("long", "exit")
// - Dollar stop-loss
if DSL > 0 and strategy.opentrades.profit(0) <= - DSL
strategy.close("long", "Stop-loss", immediately = true)
// Visuals
rsiColor = #1b9e77
thrsColor = #d95f02
rsiLine = plot(osc, "RSI", rsiColor, 1)
thrsLine = plot(sys == "BAT" ? thrs : buyLevel, "Threshold", thrsColor, 1)
zeroLine = plot(0.0, "Zero", display = display.none)
fill(zeroLine, thrsLine, sys == "BAT" ? thrs : buyLevel, 0.0, color.new(thrsColor, 60), na)