কেস ডায়নামিক স্টপ লস স্ট্র্যাটেজি

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

এই কৌশলটি মিঃ কেসের গতিশীল স্টপ লস পদ্ধতির উপর ভিত্তি করে, সর্বোত্তম স্টপ লস খুঁজতে এবং লাভ এবং ক্ষতির ভারসাম্য বজায় রাখতে লাভের মাত্রা নিতে মূল্যের গতিশীল পরিসীমা গণনা করে।

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

  1. দামের গতিশীল পরিসীমা সূচক RWH এবং RWL গণনা করুন।

  2. RWH এবং RWL থেকে বিচ্যুতি স্তর সূচক Pk বের করুন।

  3. যখন Pk>0, বিচ্যুতি স্তরের উপর ভিত্তি করে স্টপ লস গণনা করুন। যখন Pk <0, লাভের গণনা করুন।

  4. ডিভিয়েশন মাল্টিপল সাধারণত 1-3 স্ট্যান্ডার্ড ডিভিয়েশন থেকে থাকে।

  5. যখন দাম স্টপ লস/লাভকে আঘাত করে তখন বিপরীত অবস্থান নিন।

উপকারিতা:

  1. ডায়নামিক স্টপ/লাভ পরিবর্তনশীল অস্থিরতার সাথে মানিয়ে নেয়।

  2. স্টপগুলি খুব শক্ত বা খুব আলগা নয়।

  3. গাণিতিক পদ্ধতির দ্বারা আবেগগত এবং স্বার্থপর বিচার এড়ানো হয়।

ঝুঁকি:

  1. স্টপ গণনা বিলম্ব, সম্ভাব্য সেরা স্টপ টাইমিং মিস।

  2. স্টপ এবং লক্ষ্যবস্তু ভারসাম্যপূর্ণ করার জন্য প্রয়োজনীয় পরামিতি সমন্বয়.

  3. ক্ষতির আকারের কোন সীমা নেই, বড় ক্ষতির ঝুঁকি রয়েছে।

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


/*backtest
start: 2023-01-01 00:00:00
end: 2023-04-15 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 09/10/2019
//  The Kase Dev Stops system finds the optimal statistical balance between letting profits run, 
//  while cutting losses.  Kase DevStop seeks an ideal stop level by accounting for volatility (risk),
//  the variance in volatility (the change in volatility from bar to bar), and volatility skew 
//  (the propensity for volatility to occasionally spike incorrectly).
//
//  Kase Dev Stops are set at points at which there is an increasing probability of reversal against 
//  the trend being statistically significant based on the log normal shape of the range curve.  
//  Setting stops will help you take as much risk as necessary to stay in a good position, but not more.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Kase Dev Stops Backtest", overlay = true)
Length = input(30, minval=2, maxval = 100)
Level = input(title="Trade From Level", defval=4, options=[1, 2, 3, 4])
reverse = input(false, title="Trade reverse")
RWH = (high - low[Length]) / (atr(Length) * sqrt(Length))
RWL = (high[Length] - low) / (atr(Length) * sqrt(Length))
Pk = wma((RWH-RWL),3)
AVTR = sma(highest(high,2) - lowest(low,2), 20)
SD = stdev(highest(high,2) - lowest(low,2),20)
Val4 = iff(Pk>0, highest(high-AVTR-3*SD,20), lowest(low+AVTR+3*SD,20))
Val3 = iff(Pk>0, highest(high-AVTR-2*SD,20), lowest(low+AVTR+2*SD,20))
Val2 = iff(Pk>0, highest(high-AVTR-SD,20), lowest(low+AVTR+SD,20))
Val1 = iff(Pk>0, highest(high-AVTR,20), lowest(low+AVTR,20))
ResPrice = iff(Level == 4, Val4,
             iff(Level == 3, Val3,
               iff(Level == 2, Val2,
                 iff(Level == 1, Val1, Val4))))
pos = iff(close < ResPrice , -1, 1)
possig = iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1 , 1, pos))	   
if (possig == 1) 
    strategy.entry("Long", strategy.long)
if (possig == -1)
    strategy.entry("Short", strategy.short)	 
if (possig == 0) 
    strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )

আরো