
এই কৌশলটি QQE সূচক এবং RSI সূচকের উপর ভিত্তি করে, RSI সূচকের মসৃণ চলমান গড় এবং গতিশীল অস্থিরতার প্রশস্ততা গণনা করে একটি বহু-বাম সংকেত ব্যাপ্তি তৈরি করে। যখন RSI সূচকটি উর্ধ্বমুখী হয় তখন একটি বহু-সিগন্যাল উত্পন্ন হয় এবং যখন এটি নিম্নমুখী হয় তখন একটি শূন্য সংকেত উত্পন্ন হয়। কৌশলটির মূল ধারণাটি হ’ল RSI সূচকের প্রবণতার বৈশিষ্ট্য এবং QQE সূচকের ওলট-পালট বৈশিষ্ট্যগুলি ব্যবহার করে বাজারের প্রবণতা পরিবর্তন এবং ওলট-পালট সুযোগগুলি ধরতে।
এই কৌশলটি আরএসআই এবং কিউকিউই সূচকগুলির উপর ভিত্তি করে একটি বহুমুখী সংকেত তৈরি করে, যা প্রবণতা ক্যাপচার এবং ওঠানামা বোঝার বৈশিষ্ট্যযুক্ত। কৌশলটির যুক্তি স্পষ্ট, প্যারামিটারগুলি কম, আরও অপ্টিমাইজেশন এবং উন্নতির জন্য উপযুক্ত। তবে কৌশলটির কিছু ঝুঁকিও রয়েছে, যেমন প্রত্যাহার নিয়ন্ত্রণ, প্যারামিটার সেটিং ইত্যাদির ক্ষেত্রে আরও উন্নতি করা দরকার। ভবিষ্যতে কৌশলটির স্থিতিশীলতা এবং লাভজনকতা বাড়ানোর জন্য স্টপ মেশিন, প্যারামিটার অপ্টিমাইজেশন, সংকেত সমৃদ্ধি এবং বিভিন্ন বাজারের অভিযোজন ইত্যাদির ক্ষেত্রে কৌশলটি অপ্টিমাইজ করা যেতে পারে।
/*backtest
start: 2023-05-21 00:00:00
end: 2024-05-26 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
//@version=4
// modified by swigle
// thanks colinmck
strategy("QQE signals bot", overlay=true)
RSI_Period = input(14, title='RSI Length')
SF = input(5, title='RSI Smoothing')
QQE = input(4.236, title='Fast QQE Factor')
ThreshHold = input(10, title="Thresh-hold")
src = close
Wilders_Period = RSI_Period * 2 - 1
Rsi = rsi(src, RSI_Period)
RsiMa = ema(Rsi, SF)
AtrRsi = abs(RsiMa[1] - RsiMa)
MaAtrRsi = ema(AtrRsi, Wilders_Period)
dar = ema(MaAtrRsi, Wilders_Period) * QQE
longband = 0.0
shortband = 0.0
trend = 0
DeltaFastAtrRsi = dar
RSIndex = RsiMa
newshortband = RSIndex + DeltaFastAtrRsi
newlongband = RSIndex - DeltaFastAtrRsi
longband := RSIndex[1] > longband[1] and RSIndex > longband[1] ? max(longband[1], newlongband) : newlongband
shortband := RSIndex[1] < shortband[1] and RSIndex < shortband[1] ? min(shortband[1], newshortband) : newshortband
cross_1 = cross(longband[1], RSIndex)
trend := cross(RSIndex, shortband[1]) ? 1 : cross_1 ? -1 : nz(trend[1], 1)
FastAtrRsiTL = trend == 1 ? longband : shortband
// Find all the QQE Crosses
QQExlong = 0
QQExlong := nz(QQExlong[1])
QQExshort = 0
QQExshort := nz(QQExshort[1])
QQExlong := FastAtrRsiTL < RSIndex ? QQExlong + 1 : 0
QQExshort := FastAtrRsiTL > RSIndex ? QQExshort + 1 : 0
//Conditions
qqeLong = QQExlong == 1 ? FastAtrRsiTL[1] - 50 : na
qqeShort = QQExshort == 1 ? FastAtrRsiTL[1] - 50 : na
// Plotting
plotshape(qqeLong, title="QQE long", text="Long", textcolor=color.white, style=shape.labelup, location=location.belowbar, color=color.green, size=size.tiny)
plotshape(qqeShort, title="QQE short", text="Short", textcolor=color.white, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.tiny)
// trade
//if qqeLong > 0
strategy.entry("buy long", strategy.long, 100, when=qqeLong)
if qqeShort > 0
strategy.close("buy long")
// strategy.exit("close_position", "buy long", loss=1000)
// strategy.entry("sell", strategy.short, 1, when=strategy.position_size > 0)