ক্রিপ্টোকারেন্সি আরএসআই কার্ভ ট্র্যাকিং কৌশল

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

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

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

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

তবে, আরএসআই এবং আরভিআই উভয়েরই বিলম্বিত সমস্যা রয়েছে এবং তাৎক্ষণিকভাবে টার্নিং পয়েন্টগুলি ক্যাপচার করতে পারে না। স্পাইকের সাথে খাপ খাইয়ে নেওয়ার জন্য শিথিল প্যারামিটার বা চলমান স্টপ প্রয়োজন। এছাড়াও, আরএসআইয়ের জটিল মূল্য ক্রিয়াকলাপ ডিকোডিংয়ের সীমিত ক্ষমতা রয়েছে।

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


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

//@version=4
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © exlux99

strategy(title="Crypto RSI + RVI Strategy", overlay=true, initial_capital = 1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.03, pyramiding=1  )

Period = input(100, minval=1)
BuyZone = input(49, minval=1)
SellZone = input(50, minval=1)

length=Period
MA_s=0.0
pos=0.0
possig=0.0
nU=0.0
nD=0.0
nRes=0.0
ob=SellZone
os=BuyZone

WiMA(src, length) => 
    MA_s=0.0
    MA_s:=(src + nz(MA_s[1] * (length-1)))/length
    MA_s

calc_rsi_volume(fv, length) =>    
    up=iff(fv>fv[1],abs(fv-fv[1])*volume,0)
    dn=iff(fv<fv[1],abs(fv-fv[1])*volume,0)
    upt=WiMA(up,length)
    dnt=WiMA(dn,length)
    100*(upt/(upt+dnt))

rsi_v = calc_rsi_volume(close, length)

// u=plot(ob)
// l=plot(os)
// fill(u,l,color.red)
// plot(50)
// plot(rsi_v, color=color.red, linewidth=1)

 

reverse = input(false, title="Trade reverse")
xPrice = close
StdDev = stdev(xPrice, Period)
d = iff(close > close[1], 0, StdDev)
u = iff(close > close[1], StdDev, 0)
nU := (13 * nz(nU[1],0) + u) / 14
nD := (13 * nz(nD[1],0) + d) / 14
nRes := 100 * nU / (nU + nD)
pos := iff(nRes < BuyZone, -1,
       iff(nRes > SellZone, 1, nz(pos[1], 0))) 
possig := iff(reverse and pos == 1, -1,
          iff(reverse and pos == -1, 1, pos))       

 


long=crossover (rsi_v,ob) and (possig == 1) 
short=crossunder(rsi_v,os) and (possig == -1)

g(v, p) => round(v * (pow(10, p))) / pow(10, p)
risk     = input(100)
leverage = input(2.5)
c = g((strategy.equity * leverage / open) * (risk / 100), 4)

strategy.entry("long",1,c,when=long)
strategy.close("long",when=short)
//strategy.entry("short",0,when=short)

 

// ------------------------- Strategy Logic --------------------------------- //
var longOpeneda = false
var shortOpeneda = false
var int timeOfBuya = na

 

longCondition= long and not longOpeneda 

if longCondition
    longOpeneda := true
    timeOfBuya := time


longExitSignala = short
exitLongCondition = longOpeneda[1] and longExitSignala

if exitLongCondition
    longOpeneda := false
    timeOfBuya := na

//plotshape(longCondition, style=shape.labelup, location=location.belowbar, color=color.color.green, size=size.tiny, title="BUY", text="BUY", textcolor=color.color.white)
//plotshape(exitLongCondition, style=shape.labeldown, location=location.abovebar, color=color.color.red, size=size.tiny, title="SELL", text="SELL", textcolor=color.color.white)
sl=input(0.2)
tp=input(1.0)
strategy.exit("long_tp/sl", "long", profit=close * tp / syminfo.mintick, loss=close * sl / syminfo.mintick, comment='long_tp/sl', alert_message = 'closelong')
strategy.exit("short_tp/sl", "short", profit=close * tp / syminfo.mintick, loss=close * sl / syminfo.mintick, comment='short_tp/sl',  alert_message = 'closeshort')


আরো