ব্যাপ্তি ফিল্টার কিনুন বিক্রয় সংকেত কৌশল

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

img

সারসংক্ষেপ

ব্যাপ্তি ফিল্টার কিনুন বিক্রয় সংকেত কৌশল একটি খুব বাস্তব পরিমাণগত ট্রেডিং কৌশল। এটি কম অস্থিরতার বাজারে মিথ্যা সংকেত হ্রাস এবং উচ্চ অস্থিরতার বাজারে সংকেত মান উন্নত, কিনুন এবং বিক্রয় সংকেত ফিল্টার করতে মূল্য ওঠানামা ব্যাপ্তি ব্যবহার করে। কৌশল নাম সঠিকভাবে কৌশল প্রধান ফাংশন সংক্ষিপ্ত বিবরণ।

কৌশলগত যুক্তি

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

এর পরে, এটি ক্রয় এবং বিক্রয় সংকেত উত্পন্ন করবে। তবে, সমস্ত সংকেত প্রবেশকে ট্রিগার করবে না, তবে দামের ওঠানামা পরিসীমা ফিল্টারিং শর্তগুলি পূরণ করতে হবে। উদাহরণস্বরূপ, যখন দাম ওঠানামা পরিসীমাটি ভেঙে যায় তখনই একটি ক্রয় সংকেত জারি করা হয়।

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

সুবিধা

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

স্থির পরামিতি ফিল্টারগুলির তুলনায়, এই কৌশলটি আরও বুদ্ধিমান এবং অভিযোজিত। বাজারের অবস্থা যাই হোক না কেন, এটি উচ্চতর ঝুঁকি পুরস্কার প্রদান করে।

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

ঝুঁকি

কৌশলটির মূল ঝুঁকি হ'ল অস্থিরতা পরিসীমা পরামিতিগুলি সেট করা। যদি সেট পরিসীমাটি খুব বড় বা খুব ছোট হয় তবে এটি সংকেত মান এবং লাভের সুযোগগুলিকে প্রতিকূলভাবে প্রভাবিত করবে।

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

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

কৌশলটি নিম্নলিখিত দিকগুলিতে অপ্টিমাইজ করা যেতে পারেঃ

  1. স্বয়ংক্রিয়ভাবে অস্থিরতা পরিসীমা পরামিতি অপ্টিমাইজ করার জন্য অভিযোজিত পরামিতি অ্যালগরিদম ব্যবহার করুন যাতে তারা আরও বুদ্ধিমান এবং গতিশীল হয়।

  2. সংহতকরণের ফাঁদ এড়াতে বড় চক্রের প্রবণতার উপর ভিত্তি করে ফিল্টারিং নিয়ম বাড়ানো।

  3. কৌশলটির বিভিন্ন চক্রকে একত্রিত করে একটি ব্যবস্থা গড়ে তোলা এবং সামগ্রিক স্থিতিশীলতা বৃদ্ধি করা ।

  4. প্যারামিটার সেটিংস এবং ফিল্টারিং নিয়মের প্রভাব উন্নত করতে মেশিন লার্নিং অ্যালগরিদম যুক্ত করুন।

সিদ্ধান্ত

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


/*backtest
start: 2023-03-02 00:00:00
end: 2024-03-07 00:00:00
period: 1d
basePeriod: 1h
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/

// Credits to the original Script - Range Filter DonovanWall https://www.tradingview.com/script/lut7sBgG-Range-Filter-DW/
// This version is the old version of the Range Filter with less settings to tinker with

//@version=5
strategy(title='Range Filter - B&S Signals', shorttitle='[Doan]_RF-B&S Signals', overlay=true)

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Functions
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
longLossPerc = input.float(title='Long Stop Loss (%)', minval=0.0, step=0.1, defval=1) * 0.01
shortLossPerc = input.float(title='Short Stop Loss (%)', minval=0.0, step=0.1, defval=1) * 0.01

longTakePerc = input.float(title='Long Take(%)', minval=0.0, step=0.1, defval=1) * 0.01
shortTakePerc = input.float(title='Short Take (%)', minval=0.0, step=0.1, defval=1) * 0.01

emaLength = input.int(200, title="EMA Length")

// Determine stop loss price

//Range Size Function
rng_size(x, qty, n) =>
    wper = n * 2 - 1
    avrng = ta.ema(math.abs(x - x[1]), n)
    AC = ta.ema(avrng, wper) * qty
    rng_size = AC

//Range Filter Function
rng_filt(x, rng_, n) =>
    r = rng_
    var rfilt = array.new_float(2, x)
    array.set(rfilt, 1, array.get(rfilt, 0))
    if x - r > array.get(rfilt, 1)
        array.set(rfilt, 0, x - r)
    if x + r < array.get(rfilt, 1)
        array.set(rfilt, 0, x + r)
    rng_filt1 = array.get(rfilt, 0)

    hi_band = rng_filt1 + r
    lo_band = rng_filt1 - r
    rng_filt = rng_filt1
    [hi_band, lo_band, rng_filt]

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Inputs
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------

//Range Source
rng_src = input(defval=close, title='Swing Source')

//Range Period
rng_per = input.int(defval=20, minval=1, title='Swing Period')

//Range Size Inputs
rng_qty = input.float(defval=3.5, minval=0.0000001, title='Swing Multiplier')

//Bar Colors
use_barcolor = input(defval=false, title='Bar Colors On/Off')

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Definitions
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------

//Range Filter Values
[h_band, l_band, filt] = rng_filt(rng_src, rng_size(rng_src, rng_qty, rng_per), rng_per)

//Direction Conditions
var fdir = 0.0
fdir := filt > filt[1] ? 1 : filt < filt[1] ? -1 : fdir
upward = fdir == 1 ? 1 : 0
downward = fdir == -1 ? 1 : 0

//Trading Condition
longCond = rng_src > filt and rng_src > rng_src[1] and upward > 0 or rng_src > filt and rng_src < rng_src[1] and upward > 0
shortCond = rng_src < filt and rng_src < rng_src[1] and downward > 0 or rng_src < filt and rng_src > rng_src[1] and downward > 0

CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni[1]
longCondition = longCond and CondIni[1] == -1
shortCondition = shortCond and CondIni[1] == 1

//Colors
filt_color = upward ? #05ff9b : downward ? #ff0583 : #cccccc
bar_color = upward and rng_src > filt ? rng_src > rng_src[1] ? #05ff9b : #00b36b : downward and rng_src < filt ? rng_src < rng_src[1] ? #ff0583 : #b8005d : #cccccc


ema = ta.ema(close, emaLength)

//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
//Outputs
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------
longStopPrice = strategy.position_avg_price * (1 - longLossPerc)
shortStopPrice = strategy.position_avg_price * (1 + shortLossPerc)

longTakePrice = strategy.position_avg_price * (1 + longTakePerc)
shortTakePrice = strategy.position_avg_price * (1 - shortTakePerc)

//Filter Plot
filt_plot = plot(filt, color=filt_color, linewidth=3, title='Filter', transp=67)

//Band Plots
h_band_plot = plot(h_band, color=color.new(#05ff9b, 100), title='High Band')
l_band_plot = plot(l_band, color=color.new(#ff0583, 100), title='Low Band')

//Band Fills
fill(h_band_plot, filt_plot, color=color.new(#00b36b, 92), title='High Band Fill')
fill(l_band_plot, filt_plot, color=color.new(#b8005d, 92), title='Low Band Fill')

//Bar Color
barcolor(use_barcolor ? bar_color : na)
// Entry
strategy.entry("Long", strategy.long, when=longCondition)
strategy.entry("Short", strategy.short, when=shortCondition)

plot(ema)

//Plot Buy and Sell Labels
plotshape(longCondition, title='Buy Signal', text='BUY', textcolor=color.white, style=shape.labelup, size=size.normal, location=location.belowbar, color=color.new(color.green, 0))
plotshape(shortCondition, title='Sell Signal', text='SELL', textcolor=color.white, style=shape.labeldown, size=size.normal, location=location.abovebar, color=color.new(color.red, 0))

//Alerts
alertcondition(longCondition, title='Buy Alert', message='BUY')
alertcondition(shortCondition, title='Sell Alert', message='SELL')





আরো