অস্থিরতা ব্রেকআউট বিপরীত ট্রেডিং কৌশল

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

img

সারসংক্ষেপ

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

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

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

বিশেষত, শেষ N বারগুলির উপর ATR প্রথমে গণনা করা হয়। এটিআরটি তারপরে একটি ফ্যাক্টর দ্বারা গুণিত হয় যাতে ARC পাওয়া যায়, যা মূল্য চ্যানেলের প্রস্থকে নিয়ন্ত্রণ করে। N বারগুলির উপরে সর্বোচ্চ বন্ধের দামের সাথে ARC যোগ করা চ্যানেলের উপরের ব্যান্ড বা উচ্চ SAR দেয়। সর্বনিম্ন বন্ধের দাম থেকে ARC কেটে নিম্ন ব্যান্ড বা নিম্ন SAR দেয়। যদি দামগুলি উপরের ব্যান্ডের উপরে বন্ধ হয় তবে একটি শর্ট পজিশন নেওয়া হয়। যদি দামগুলি নিম্ন ব্যান্ডের নীচে বন্ধ হয় তবে একটি দীর্ঘ অবস্থান নেওয়া হয়।

সুবিধা

  1. বাজারের পরিবর্তনগুলি ট্র্যাক করার জন্য অভিযোজিত চ্যানেলগুলি গণনা করতে অস্থিরতা ব্যবহার করে
  2. রিভার্সাল ট্রেডিং ট্রেন্ড রিভার্সাল মার্কেটস
  3. মুনাফা এবং নিয়ন্ত্রণ ঝুঁকিতে স্টপ লাভ এবং স্টপ লস লক সরানো

ঝুঁকি

  1. বিপরীত ট্রেডিং ফাঁদে পড়া প্রবণ, পরামিতি সঠিক মিটিং প্রয়োজন
  2. তীব্র অস্থিরতা পজিশনগুলিকে অকাল বন্ধ করতে পারে
  3. অপ্রয়োজনীয় পরামিতিগুলি অত্যধিক ট্রেডিংয়ের কারণ হতে পারে

সমাধান:

  1. যুক্তিসঙ্গত চ্যানেল প্রস্থের জন্য ATR সময়কাল এবং ARC ফ্যাক্টর অপ্টিমাইজ করুন
  2. প্রবেশ সংকেতগুলির জন্য প্রবণতা ফিল্টার যোগ করুন
  3. ট্রেডিং ফ্রিকোয়েন্সি হ্রাস করার জন্য ATR সময় বাড়ান

উন্নতির সুযোগ

  1. ATR সময়কাল এবং ARC ফ্যাক্টর অপ্টিমাইজ করুন
  2. এমএসিডি এর মত প্রবেশের শর্ত যোগ করুন
  3. স্টপ লস কৌশল অন্তর্ভুক্ত করুন

সিদ্ধান্ত

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


/*backtest
start: 2023-02-12 00:00:00
end: 2024-02-18 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//@author=LucF

// Volatility System [LucF]
// v1.0, 2019.04.14

// The Volatility System was created by Welles Wilder.
// It first appeared in his seminal masterpiece "New Concepts in Technical Trading Systems" (1978).
// He describes it on pp.23-26, in the chapter discussing the first presentation ever of the "Volatility Index",
// which later became known as ATR.
// Performance of the strategy usually increases with the time frame.
// Tuning of ATR length and, especially, the ARC factor, is key.

// This code runs as a strategy, which cannot generate alerts.
// If you want to use the alerts it must be converted to an indicator.
// To do so:
//      1. Swap the following 2 lines by commenting the first and uncommenting the second.
//      2. Comment out the last 4 lines containing the strategy() calls.
//      3. Save.
strategy(title="Volatility System by Wilder [LucF]", shorttitle="Volatility System [Strat]", overlay=true, precision=8, pyramiding=0, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1)
// study("Volatility System by Wilder [LucF]", shorttitle="Volatility System", precision=8, overlay=true)

// -------------- Colors
MyGreenRaw = color(#00FF00,0),      MyGreenMedium = color(#00FF00,50),  MyGreenDark = color(#00FF00,75),    MyGreenDarkDark = color(#00FF00,92)
MyRedRaw = color(#FF0000,0),        MyRedMedium = color(#FF0000,30),    MyRedDark = color(#FF0000,75),      MyRedDarkDark = color(#FF0000,90)

// -------------- Inputs
LongsOnly = input(false,"Longs only")
ShortsOnly = input(false,"Shorts only")
AtrLength = input(9, "ATR length", minval=2)
ArcFactor = input(1.8, "ARC factor", minval=0, type=float,step=0.1)
ShowSAR = input(false, "Show all SARs (Stop & Reverse)")
HideSAR = input(false, "Hide all SARs")
ShowTriggers = input(false, "Show Entry/Exit triggers")
ShowTradedBackground = input(false, "Show Traded Background")

FromYear  = input(defval = 2000,    title = "From Year", minval = 1900)
FromMonth = input(defval = 1,      title = "From Month", minval = 1, maxval = 12)
FromDay   = input(defval = 1,       title = "From Day", minval = 1, maxval = 31)
ToYear    = input(defval = 9999,    title = "To Year", minval = 1900)
ToMonth   = input(defval = 1,       title = "To Month", minval = 1, maxval = 12)
ToDay     = input(defval = 1,       title = "To Day", minval = 1, maxval = 31)

// -------------- Date range filtering
FromDate = timestamp(FromYear, FromMonth, FromDay, 00, 00)
ToDate = timestamp(ToYear, ToMonth, ToDay, 23, 59)
TradeDateIsAllowed() => true

// -------------- Calculate Stop & Reverse (SAR) points using Average Range Constant (ARC)
Arc   = atr(AtrLength)*ArcFactor
SarLo = highest(close, AtrLength)-Arc
SarHi = lowest(close, AtrLength)+Arc

// -------------- Entries/Exits
InLong = false
InShort = false
EnterLong = TradeDateIsAllowed() and not InLong[1] and crossover(close, SarHi[1])
EnterShort = TradeDateIsAllowed() and not InShort[1] and crossunder(close, SarLo[1])
InLong := (InLong[1] and not EnterShort[1]) or (EnterLong[1] and not ShortsOnly)
InShort := (InShort[1] and not EnterLong[1]) or (EnterShort[1] and not LongsOnly)

// -------------- Plots
// SAR points
plot( not HideSAR and ((InShort or EnterLong) or ShowSAR)? SarHi:na, color=MyRedMedium, style=circles, linewidth=2, title="SAR High")
plot( not HideSAR and ((InLong or EnterShort) or ShowSAR)? SarLo:na, color=MyGreenMedium, style=circles, linewidth=2, title="SAR Low")
// Entry/Exit markers
plotshape( ShowTriggers and not ShortsOnly and EnterLong, style=shape.triangleup, location=location.belowbar, color=MyGreenRaw, size=size.small, text="")
plotshape( ShowTriggers and not LongsOnly and EnterShort, style=shape.triangledown, location=location.abovebar, color=MyRedRaw, size=size.small, text="")
// Exits when printing only longs or shorts
plotshape( ShowTriggers and ShortsOnly and InShort[1] and EnterLong, style=shape.triangleup, location=location.belowbar, color=MyRedMedium, transp=70, size=size.small, text="")
plotshape( ShowTriggers and LongsOnly and InLong[1] and EnterShort, style=shape.triangledown, location=location.abovebar, color=MyGreenMedium, transp=70, size=size.small, text="")
// Background
bgcolor( color=ShowTradedBackground? InLong and not ShortsOnly?MyGreenDarkDark: InShort and not LongsOnly? MyRedDarkDark:na:na)

// ---------- Alerts
alertcondition( EnterLong or EnterShort, title="1. Reverse", message="Reverse")
alertcondition( EnterLong, title="2. Long", message="Long")
alertcondition( EnterShort, title="3. Short", message="Short")

// ---------- Strategy reversals
strategy.entry("Long", strategy.long, when=EnterLong and not ShortsOnly)
strategy.entry("Short", strategy.short, when=EnterShort  and not LongsOnly)
strategy.close("Short", when=EnterLong and ShortsOnly)
strategy.close("Long", when=EnterShort and LongsOnly)


আরো