INDICATOR QQE MOD
Forums › ProRealTime forum Français › Support ProBuilder › INDICATOR QQE MOD
- This topic has 2 replies, 2 voices, and was last updated 7 months ago by ARLEQUIN49.
-
-
04/06/2024 at 1:03 PM #231151
Hello Ivan,
Would it be possible to convert the code of this QQE MOD indicator which accompanies SSL HYBRID?Here is the code:
//@version=4
//By Glaz, Modified
//
study(“QQE MOD”)
RSI_Period = input(6, title=’RSI Length’)
SF = input(5, title=’RSI Smoothing’)
QQE = input(3, title=’Fast QQE Factor’)
ThreshHold = input(3, title=”Thresh-hold”)
//src = input(close, title=”RSI Source”)
////
Wilders_Period = RSI_Period * 2 – 1Rsi = rsi(src, RSI_Period)
RsiMa = ema(Rsi, SF)
AtrRsi = abs(RsiMa[1] – RsiMa)
MaAtrRsi = ema(AtrRsi, Wilders_Period)
dar = ema(MaAtrRsi, Wilders_Period) * QQElongband = 0.0
shortband = 0.0
trend = 0DeltaFastAtrRsi = 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 upper ? #00c3ff : RsiMa – 50 = 50 ? QQEzlong + 1 : 0
QQEzshort := RSIndex longband2[1] and RSIndex2 > longband2[1] ?
max(longband2[1], newlongband2) : newlongband2
shortband2 := RSIndex2[1] < shortband2[1] and RSIndex2 = 50 ? QQE2zlong + 1 : 0
QQE2zshort := RSIndex2 ThreshHold2 ? color.silver :
RsiMa2 – 50 ThreshHold2
Greenbar2 = RsiMa – 50 > upperRedbar1 = RsiMa2 – 50 < 0 – ThreshHold2
Redbar2 = RsiMa – 50 < lower
plot(Greenbar1 and Greenbar2 == 1 ? RsiMa2 – 50 : na, title=”QQE Up”, style=plot.style_columns, color=#00c3ff, transp=0)
plot(Redbar1 and Redbar2 == 1 ? RsiMa2 – 50 : na, title=”QQE Down”, style=plot.style_columns, color=#ff0062, transp=0)04/08/2024 at 2:00 PM #231232Ici
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148//PRC_QQE MOD//version = 0//08.04.24//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-----Inputs-----------------------------------------------//rsiPeriod=6//RSI LengthSF=5//RSI SmoothingQQE=3//Fast QQE FactorThreshHold=3//Thresh-holdsrc=closelength=50//Bollinger Lengthmult=0.35//BB MultiplierrsiPeriod2=6//RSI LengthSF2=5//RSI SmoothingQQE2=1.61//Fast QQE FactorThreshHold2=3//Thresh-holdsrc2=close//----------------------------------------------------------////-----RSI1 calculations and trend definition---------------//WildersPeriod = rsiPeriod*2-1myrsi=rsi[rsiPeriod](src)rsiMA=average[SF,1](myrsi)atrRSI=abs(rsiMA[1]-rsiMA)MAatrRSI=average[WildersPeriod,1](atrRSI)dar = average[WildersPeriod,1](MAatrRSI)*QQElongband=0shortband=0trend=0DeltaFastAtrRsi = darRSIndex = rsiMAnewshortband = RSIndex + DeltaFastAtrRsinewlongband = RSIndex - DeltaFastAtrRsiif RSIndex[1] > longband[1] and RSIndex > longband[1] thenlongband=max(longband[1],newlongband)elselongband=newlongbandendifif RSIndex[1] < shortband[1] and RSIndex < shortband[1] thenshortband=min(shortband[1], newshortband)elseshortband=newshortbandendifcross1 = longband[1] crosses over RSIndex or longband[1] crosses under RSIndexif shortband[1] crosses over RSIndex or shortband[1] crosses under RSIndex thentrend=1FastAtrRsiTL=longbandelsif cross1 thentrend=-1FastAtrRsiTL=shortbandelsetrend=trend[1]endif//----------------------------------------------------------////-----Bollinger Bands--------------------------------------//basis=average[length,0](FastAtrRsiTL-50)dev=mult*std[length](FastAtrRsiTL-50)upper=basis+devlower=basis-dev//----------------------------------------------------------////-----RSI2 calculations and trend definition---------------//WildersPeriod2 = rsiPeriod2*2-1myrsi2=rsi[rsiPeriod2](src2)rsiMA2=average[SF2,1](myrsi2)atrRSI2=abs(rsiMA2[1]-rsiMA2)MAatrRSI2=average[WildersPeriod2,1](atrRSI2)dar2 = average[WildersPeriod2,1](MAatrRSI2)*QQE2longband2=0shortband2=0trend2=0DeltaFastAtrRsi2 = dar2RSIndex2 = rsiMA2newshortband2 = RSIndex2 + DeltaFastAtrRsi2newlongband2 = RSIndex2 - DeltaFastAtrRsi2if RSIndex2[1] > longband2[1] and RSIndex2 > longband2[1] thenlongband2=max(longband2[1],newlongband2)elselongband2=newlongband2endifif RSIndex2[1] < shortband2[1] and RSIndex2 < shortband2[1] thenshortband2=min(shortband2[1], newshortband2)elseshortband2=newshortband2endifcross2 = longband2[1] crosses over RSIndex2 or longband2[1] crosses under RSIndex2if shortband2[1] crosses over RSIndex2 or shortband2[1] crosses under RSIndex2 thentrend2=1FastAtrRsiTL2=longband2elsif cross2 thentrend2=-1FastAtrRsiTL2=shortband2elsetrend2=trend2[1]endif//----------------------------------------------------------////-----Color definition------------------------------------//if rsiMA2-50>ThreshHold2 thenr=178g=181b=190a=100elsif rsiMA2-50<0-ThreshHold2 thenr=178g=181b=190a=100elser=178g=181b=190a=0endif//----------------------------------------------------------////-----Checkings and colors---------------------------------//greenbar1=rsiMA2-50>ThreshHold2greenbar2=rsiMA-50>upperredbar1=RsiMa2-50<0-ThreshHold2Redbar2 =RsiMa-50<lowerif greenbar1 and greenbar2 thenqqe=rsiMA2-50rb=0gb=195bb=255elsif redbar1 and redbar2 thenqqe=rsiMA2-50rb=255gb=0bb=98elseqqe=0rb=120gb=123bb=134endif//----------------------------------------------------------//zero=0return qqe as "QQE" coloured(rb,gb,bb)style(histogram),FastAtrRsiTL2-50 as "QQE Line"coloured("Black")style(line,2),rsiMA2-50 as"Histo2"coloured(r,g,b,a)style(histogram) ,zero as "Zero" coloured("white")style(dottedline)1 user thanked author for this post.
04/08/2024 at 4:18 PM #231248 -
AuthorPosts
Find exclusive trading pro-tools on