এই কৌশলটি একাধিক প্রযুক্তিগত সূচক ব্যবহার করে, দামের প্রবণতা বিচার করে এবং ক্রয় এবং বিক্রয় সংকেত দেয়।
এই কৌশলটি মূলত নিম্নলিখিত প্রযুক্তিগত সূচকগুলির উপর ভিত্তি করে মূল্যের প্রবণতা নির্ধারণ করেঃ
সুপারট্রেন্ড সূচক ((SuperTrend): এটিআর-এর উপর ভিত্তি করে উচ্চতর এবং নিম্নতর ট্র্যাকের উপর ভিত্তি করে, দামগুলি উচ্চতর ট্র্যাককে অতিক্রম করে এবং নিম্নতর ট্র্যাককে অতিক্রম করে।
সরল চলমান গড় (এসএমএ): দামের উপরে এসএমএ বেশি, নীচে এসএমএ খালি;
গতিশীলতা সূচক ((Momentum): মূল্যের গতিশীলতা ইতিবাচক হিসাবে বেশি, নেতিবাচক হিসাবে কম;
MACD: DIFF DEA লাইন অতিক্রম করে, এবং DEA লাইন অতিক্রম করে।
বুল এন্ড বিয়ার: বুল এন্ড বিয়ারের চেয়ে বুল এন্ড বিয়ারের শক্তি অনেক বেশি, কিন্তু বুল এন্ড বিয়ারের শক্তি কম।
আরএসআইঃ আরএসআই 30 লাইনের উপরে বেশি, 70 লাইনের নীচে খালি;
সূর্যাস্তের সূর্যাস্তঃ ক্রমাগত এন সূর্যাস্তের সূর্যাস্তটি খালি, ক্রমাগত এন সূর্যাস্তের সূর্যাস্তটি বেশি;
CCI: CCI 100 এর বেশি বেশি, 100 এর কম কম;
DMI: DMI মাল্টি-হেড তারের চেয়ে বড়, এটি খালি;
মার্কেট ওয়েভঃ দাম বাড়ার সাথে সাথে দাম কমতে থাকে।
এলোমেলো সূচকঃ এলোমেলো সূচকের উপরে 20 লাইন বেশি, নীচে 80 লাইন খালি।
ইন্ডিকেটরগুলির দ্বারা গণনা করা ফলাফলগুলি 1 বা -1 পয়েন্ট দেয়, উপরের বা নীচের দিকের উপর নির্ভর করে। সমস্ত ইন্ডিকেটরের পয়েন্টগুলি যোগ করুন এবং মোট পয়েন্টগুলি পান। যখন মোট পয়েন্টের সংখ্যা 0 লাইন অতিক্রম করে তখন একটি ক্রয় সংকেত উত্পন্ন হয়; যখন মোট পয়েন্টের সংখ্যা 0 লাইন অতিক্রম করে তখন বিক্রয় সংকেত উত্পন্ন হয়।
এই ধরনের মাল্টি-ইন্ডিকেটর সমন্বয় কৌশলটির সবচেয়ে বড় সুবিধা হ’ল উচ্চ নির্ভরযোগ্যতা, কারণ একাধিক সূচক প্রবণতা দিক নির্ধারণের জন্য সমন্বিতভাবে ব্যবহার করা হয়, ফলস্বরূপ, ভুয়া সংকেতগুলি কার্যকরভাবে হ্রাস করা যায় এবং সংকেতগুলি আরও নির্ভরযোগ্য করে তোলে। একক সূচকের তুলনায় এই ধরনের সমন্বয় কৌশল নির্ভরযোগ্যতা এবং স্থায়িত্বের জন্য আরও ভাল।
আরেকটি সুবিধা হ’ল কৌশলটির নমনীয়তা এবং কাস্টমাইজযোগ্যতা। সূচকগুলির প্রকার এবং পরামিতি সেটিংগুলি বিভিন্ন বাজারের সাথে সামঞ্জস্যপূর্ণ হতে পারে, কৌশলগুলিকে বিভিন্ন পরিস্থিতিতে আরও উপযুক্ত করে তোলে। এছাড়াও, ফিডব্যাকের ফলাফল অনুসারে সূচকের ওজন সামঞ্জস্য করা যেতে পারে।
এই ধরনের সমন্বিত কৌশলগুলির কিছু ঝুঁকি রয়েছে যা সম্পর্কে সতর্ক হওয়া দরকারঃ
যদি নির্বাচিত সূচকগুলির মধ্যে সম্পর্ক খুব বেশি হয় তবে এটি পুনরাবৃত্তি সংকেতের ঝুঁকি সৃষ্টি করে। এটি বিভিন্ন বাজার পরিস্থিতির উপর নির্ভর করে কম সম্পর্কযুক্ত সূচকগুলির সংমিশ্রণের প্রয়োজন।
যদি ইন্ডিকেটর সংখ্যা বেশি হয় এবং গণনা সময় বেশি হয়, তবে সিগন্যালের সময়মততা প্রভাবিত হবে। ইন্ডিকেটর সংখ্যা এবং সময়মততার মধ্যে সম্পর্ককে ভারসাম্য করতে হবে।
ইন্ডিকেটর প্যারামিটার সেট করা ভুল হলে তা কৌশলকে প্রভাবিত করতে পারে।
মার্কেটের বিভিন্ন পর্যায়ে ইন্ডিকেটর এর কার্যকারিতা ভিন্ন হতে পারে। রোলব্যাকের মাধ্যমে এর কার্যকারিতা ক্রমাগত পরীক্ষা করা প্রয়োজন।
এই কৌশলটি নিম্নলিখিত দিকগুলি থেকে অপ্টিমাইজ করা যায়ঃ
ইন্ডিকেটরগুলির প্রকার এবং সংখ্যা অনুকূলিতকরণ এবং সর্বোত্তম সমন্বয় নির্বাচন করা;
ইন্ডিকেটরগুলির জন্য প্যারামিটার সেটিং অপ্টিমাইজ করুন;
ইন্ডিকেটরের ওজন অনুপাত পরিবর্তন করে মূল ইন্ডিকেটরের ওজন বাড়ানো;
ভুয়া ব্রেকিং এড়াতে শর্তাধীন ফিল্টারিং, যেমন লেনদেনের পরিমাণ বৃদ্ধি;
মেশিন লার্নিং অ্যালগরিদমের সাহায্যে মডেল পোর্টফোলিও পদ্ধতি ব্যবহার করে স্বয়ংক্রিয়ভাবে সর্বোত্তম কৌশল পোর্টফোলিও খুঁজে বের করা।
সংক্ষেপে বলা যায়, এই মাল্টি-ইন্ডিকেটর প্যারি কৌশলটি বিভিন্ন ধরণের সূচকের সুবিধা গ্রহণ করে, প্যারি ট্রেন্ডের দিকনির্দেশনা দেয়, মিথ্যা সংকেত হ্রাস করতে পারে এবং সংকেতের নির্ভরযোগ্যতা বাড়িয়ে তুলতে পারে। সূচক নির্বাচন, প্যারামিটার সেট, ওজনের বরাদ্দ ইত্যাদির অপ্টিমাইজেশনের মাধ্যমে কৌশলটির স্থায়িত্ব ক্রমাগত উন্নত করা যেতে পারে। এই জাতীয় প্যারি কৌশলটি কৌশল ব্যবসায়ীদের জন্য উপযুক্ত যারা সূচক সংকেতের স্থায়িত্বের উচ্চ প্রয়োজনীয়তা রাখে।
/*backtest
start: 2023-01-01 00:00:00
end: 2023-10-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Super indicator ", overlay=true, precision=2, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.075)
/////////////// Time Frame ///////////////
_0 = input(false, "════════ Test Period ═══════")
testStartYear = input(2017, "Backtest Start Year")
testStartMonth = input(1, "Backtest Start Month")
testStartDay = input(1, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay, 0, 0)
testStopYear = input(2019, "Backtest Stop Year")
testStopMonth = input(12, "Backtest Stop Month")
testStopDay = input(31, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay, 0, 0)
testPeriod() =>true
hilow = ((high - low)*100)
openclose = ((close - open)*100)
vol1 = (volume / hilow)
spreadvol = (openclose * vol1)
VPT = spreadvol + cum(spreadvol)
window_len = 28
v_len = 14
price_spread = stdev(high-low, window_len)
vp = spreadvol + cum(spreadvol)
smooth = sma(vp, v_len)
v_spread = stdev(vp - smooth, window_len)
shadow = (vp - smooth) / v_spread * price_spread
out1 = shadow > 0 ? high + shadow : low + shadow
//plot(out, style=line,linewidth=3, color=color)
len=5
vpt=ema(out1,len)
// INPUTS //
st_mult =3
st_period = 7
// CALCULATIONS //
up_lev = vpt - (st_mult * atr(st_period))
dn_lev = vpt + (st_mult * atr(st_period))
up_trend = 0.0
up_trend := close[1] > up_trend[1] ? max(up_lev, up_trend[1]) : up_lev
down_trend = 0.0
down_trend := close[1] < down_trend[1] ? min(dn_lev, down_trend[1]) : dn_lev
// Calculate trend var
trend10 = 0
trend10 := close > down_trend[1] ? 1: close < up_trend[1] ? -1 : nz(trend10[1], 1)
// Calculate SuperTrend Line
st_line = trend10 ==1 ? up_trend : down_trend
//
src = input(close, title="Source")
//sma
sma20 = sma(src, 20)
smapoint = 0
smapoint := src > sma20 ? smapoint + 1 : smapoint - 1
//AO
ao = sma(hl2,5) - sma(hl2,34)
aopoint = ao > 0 ? 1 : ao < 0 ? -1 : 0
//momentum
mom = src - src[14]
mompoint = mom > 0 ? 1 : mom < 0 ? -1 : 0
//MACD
fast_ma = ema(src, 12)
slow_ma = ema(src, 26)
macd = fast_ma - slow_ma
signal = ema(macd, 9)
hist = macd - signal
histpoint = hist > hist[1] ? 3 : -3
//Bull bear
Length = 30
r1=iff(close[1]<open,max(open-close[1],high-low),high-low)
r2=iff(close[1]>open,max(close[1]-open,high-low),high-low)
bull=iff(close==open,iff(high-close==close-low,iff(close[1]>open,max(high-open,close-low),r1),iff(high-close>close-low,iff(close[1]<open, max(high-close[1],close-low), high-open),r1)),iff(close<open,iff(close[1]<open,max(high-close[1],close-low), max(high-open,close-low)),r1))
bear=iff(close==open,iff(high-close==close-low,iff(close[1]<open,max(open-low,high-close),r2),iff(high-close>close-low,r2,iff(close[1]>open,max(close[1]-low,high-close), open-low))),iff(close<open,r2,iff(close[1]>open,max(close[1]-low,high-close),max(open-low,high-close))))
colors=iff(sma(bull-bear,Length)>0, color.green, color.red)
// barcolor(colors)
bbpoint = sma(bull-bear,Length)>0 ? 1 : -1
//UO
length7 = 7,
length14 = 14,
length28 = 28
average(bp, tr_, length) => sum(bp, length) / sum(tr_, length)
high_ = max(high, src[1])
low_ = min(low, src[1])
bp = src - low_
tr_ = high_ - low_
avg7 = average(bp, tr_, length7)
avg14 = average(bp, tr_, length14)
avg28 = average(bp, tr_, length28)
uoout = 100 * (4*avg7 + 2*avg14 + avg28)/7
uopoint = uoout > 70 ? 1 : uoout < 30 ? -1 : 0
//IC
conversionPeriods = 9
basePeriods = 26
laggingSpan2Periods = 52
displacement = 26
donchian(len) => avg(lowest(len), highest(len))
baseLine = donchian(basePeriods)
icpoint = src > baseLine ? 1 : -1
//HMA
hullma = wma(2*wma(src, 9/2)-wma(src, 21), round(sqrt(21)))
hmapoint = src > hullma ? 2 : -2
//
//
trendDetectionLength =4
float trend = na
float wave = na
float vol = na
mov = close>close[1] ? 1 : close<close[1] ? -1 : 0
trend := (mov != 0) and (mov != mov[1]) ? mov : nz(trend[1])
isTrending = rising(close, trendDetectionLength) or falling(close, trendDetectionLength)
wave := (trend != nz(wave[1])) and isTrending ? trend : nz(wave[1])
vol := wave == wave[1] ? (nz(vol[1])+volume) : volume
up1 = wave == 1 ? vol : 0
dn1 = wave == 1 ? 0 : vol
Weis= up1 > dn1 ? 2 : -2
//
roclen =20
ccilen =21
dilen = 5
dirmov(len) =>
up = change(high)
down = -change(low)
truerange = rma(tr, len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / truerange)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / truerange)
[plus, minus]
f_draw_infopanel(_x, _y, _line, _text, _color)=>
_rep_text = ""
for _l = 0 to _line
_rep_text := _rep_text + "\n"
_rep_text := _rep_text + _text
var label _la = na
label.delete(_la)
_la := label.new(
x=_x, y=_y,
text=_rep_text, xloc=xloc.bar_time, yloc=yloc.price,
color=color.black, style=label.style_labelup, textcolor=_color, size=size.normal)
TD = 0
TS = 0
TD := close > close[4] ? nz(TD[1]) + 1 : 0
TS := close < close[4] ? nz(TS[1]) + 1 : 0
TDUp = TD - valuewhen(TD < TD[1], TD , 1 )
TDDn = TS - valuewhen(TS < TS[1], TS , 1 )
td = TDUp > 0 ? 2 : TDDn > 0 ? -2 : 0
roc = roc(close, roclen)
Roc=roc > 0 ? 1 : -1
cci = cci(close, ccilen)
CCI=cci > 0? 2 : -2
[plus, minus] = dirmov(dilen)
dmi = plus - minus
DMI= dmi >= 0? 2 : -2
//
STT=trend10 == 1 ? 1 : -1
//
periods = 2
smooth1 = 14
price = close
fn(src, length) =>
MA_s= 0.0
MA_s:=(src + nz(MA_s[1] * (length-1)))/length
MA_s
r11 = ema( price, periods )
r22 = iff( price > r11, price - r11, 0 )
r3 = iff( price < r11, r11 - price, 0 )
r4 = fn( r22, smooth1 )
r5 = fn( r3, smooth1 )
rr = iff( r5 == 0, 100, 100 - ( 100 / ( 1 + ( r4 / r5 ) ) ) )
length = 20,fast = 7,slow = 13
//
src10 = rr
er = abs(change(src,length))/sum(abs(change(src10)),length)
dev = er*stdev(src10*2,fast) + (1-er)*stdev(src10*2,slow)
a = 0.
a := bar_index < 9 ? src10 : src10 > a[1] + dev ? src10 : src10 < a[1] - dev ? src10 : a[1]
//
rsi=fixnan(a > a[1] ? 3 : a < a[1] ?-3 : na)
//
totalpoints =rsi+td+STT+Roc+DMI+ CCI+Weis+smapoint + aopoint + mompoint + histpoint + bbpoint + icpoint + hmapoint
//
piz=input(1)
tt=sma(totalpoints,piz)
//
zero=0
down = crossunder(tt, 0)
up = crossover(tt, -0)
//Alerts
/////// Alerts /////
alertcondition(down,title="sell")
alertcondition(up,title="buy")
//
/////////////// Strategy ///////////////
long = up
short = down
strategy.entry("Long", strategy.long, when = long)
strategy.entry("Short", strategy.short, when = short)