QQE threshold, Conversion code MT4 vers PRT
Forums › ProRealTime forum Français › Support ProBuilder › QQE threshold, Conversion code MT4 vers PRT
- This topic has 2 replies, 2 voices, and was last updated 6 months ago by Philouxp.
-
-
06/24/2024 at 12:04 PM #234283
Bonjour, serait il possible d’avoir la version PRT de l’indicateur QQE THRESHOLD de TradingView SVP?
Je suis désolé je n’ai pas le fichier .MQ4 mais simplement le code présent dans TradingView ci-dessous :
Cet indicateur reprend le QQE mais apparait sous la forme de barre où l’on peut customiser la couleurs de ces dernières pour avoir des signaux de tendance plus pertinant surtout en mode sclaping. Cet indicateur est pertinent couplé à d’autres indicateurs de tendance comme le Pivot Point SuperTrend.
Le script est disponible ici :
https://www.tradingview.com/script/99S4uEso-QQE-threshold/
//@version=4//By Glaz//Modifications:// Added Columns to show when signal is outside of Thresh Hold Channnel.// Set default Parameters to match QQE Cross Alert indicator.//study(“QQE MT4 Glaz-modified by JustUncleL”)RSI_Period = input(14, title=’RSI Length’)SF = input(5, title=’RSI Smoothing’)QQE = input(4.238, title=’Fast QQE Factor’)ThreshHold = input(10, title=”Thresh-hold”)//sQQEx = input(false, title=”Show Smooth RSI, QQE Signal crosses”)sQQEz = input(false, title=”Show Smooth RSI Zero crosses”)sQQEc = input(false, title=”Show Smooth RSI Thresh Hold Channel Exits”)ma_type = input(title=”MA Type”, type=input.string, defval=”EMA”, options=[“ALMA”, “EMA”, “DEMA”, “TEMA”, “WMA”, “VWMA”, “SMA”, “SMMA”, “HMA”, “LSMA”, “PEMA”])lsma_offset = input(defval=0, title=”* Least Squares (LSMA) Only – Offset Value”, minval=0)alma_offset = input(defval=0.85, title=”* Arnaud Legoux (ALMA) Only – Offset Value”, minval=0, step=0.01)alma_sigma = input(defval=6, title=”* Arnaud Legoux (ALMA) Only – Sigma Value”, minval=0)inpDrawBars = input(true, title=”color bars?”)ma(type, src, len) =>float result = 0if type==”SMA” // Simpleresult := sma(src, len)if type==”EMA” // Exponentialresult := ema(src, len)if type==”DEMA” // Double Exponentiale = ema(src, len)result := 2 * e – ema(e, len)if type==”TEMA” // Triple Exponentiale = ema(src, len)result := 3 * (e – ema(e, len)) + ema(ema(e, len), len)if type==”WMA” // Weightedresult := wma(src, len)if type==”VWMA” // Volume Weightedresult:=vwma(src,len)if type==”SMMA” // Smoothedw = wma(src, len)result := na(w[1]) ? sma(src, len) : (w[1] * (len – 1) + src) / lenif type==”HMA” // Hullresult := wma(2 * wma(src, len / 2) – wma(src, len), round(sqrt(len)))if type==”LSMA” // Least Squaresresult := linreg(src, len, lsma_offset)if type==”ALMA” // Arnaud Legouxresult := alma(src, len, alma_offset, alma_sigma)if type==”PEMA”// Copyright (c) 2010-present, Bruno Pio// Copyright (c) 2019-present, Alex Orekhov (everget)// Pentuple Exponential Moving Average script may be freely distributed under the MIT license.ema1 = ema(src, len)ema2 = ema(ema1, len)ema3 = ema(ema2, len)ema4 = ema(ema3, len)ema5 = ema(ema4, len)ema6 = ema(ema5, len)ema7 = ema(ema6, len)ema8 = ema(ema7, len)pema = 8 * ema1 – 28 * ema2 + 56 * ema3 – 70 * ema4 + 56 * ema5 – 28 * ema6 + 8 * ema7 – ema8result := pemaresultsrc = input(close, title=”RSI Source”)////Wilders_Period = RSI_Period * 2 – 1Rsi = rsi(src, RSI_Period)RsiMa = ma(ma_type, Rsi, SF)AtrRsi = abs(RsiMa[1] – RsiMa)MaAtrRsi = ma(ma_type, AtrRsi, Wilders_Period)dar = ma(ma_type, MaAtrRsi, Wilders_Period) * QQElongband = 0.0shortband = 0.0trend = 0DeltaFastAtrRsi = darRSIndex = RsiManewshortband = RSIndex + DeltaFastAtrRsinewlongband = RSIndex – DeltaFastAtrRsilongband:=RSIndex[1]>longband[1]andRSIndex>longband[1]?max(longband[1], newlongband) : newlongbandshortband:=RSIndex[1]<shortband[1]andRSIndex<shortband[1]?min(shortband[1], newshortband) : newshortbandcross_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 CrossesQQExlong = 0QQExlong := nz(QQExlong[1])QQExshort = 0QQExshort := nz(QQExshort[1])QQExlong := sQQEx and FastAtrRsiTL < RSIndex ? QQExlong + 1 : 0QQExshort := sQQEx and FastAtrRsiTL > RSIndex ? QQExshort + 1 : 0// Zero crossQQEzlong = 0QQEzlong := nz(QQEzlong[1])QQEzshort = 0QQEzshort := nz(QQEzshort[1])QQEzlong := sQQEz and RSIndex >= 50 ? QQEzlong + 1 : 0QQEzshort := sQQEz and RSIndex < 50 ? QQEzshort + 1 : 0//// Thresh Hold channel Crosses give the BUY/SELL alerts.QQEclong = 0QQEclong := nz(QQEclong[1])QQEcshort = 0QQEcshort := nz(QQEcshort[1])QQEclong := sQQEc and RSIndex > 50 + ThreshHold ? QQEclong + 1 : 0QQEcshort := sQQEc and RSIndex < 50 – ThreshHold ? QQEcshort + 1 : 0// QQE exit from Thresh Hold Channelplotshape(sQQEc and QQEclong == 1 ? RsiMa – 50 : na, title=”QQE XC Over Channel”, style=shape.diamond, location=location.absolute, color=color.olive, transp=0, size=size.small, offset=0)plotshape(sQQEc and QQEcshort == 1 ? RsiMa – 50 : na, title=”QQE XC Under Channel”, style=shape.diamond, location=location.absolute, color=color.red, transp=0, size=size.small, offset=0)// QQE crossesplotshape(sQQEx and QQExlong == 1 ? FastAtrRsiTL[1] – 50 : na, title=”QQE XQ Cross Over”, style=shape.circle, location=location.absolute, color=color.lime, transp=0, size=size.small, offset=-1)plotshape(sQQEx and QQExshort == 1 ? FastAtrRsiTL[1] – 50 : na, title=”QQE XQ Cross Under”, style=shape.circle, location=location.absolute, color=color.blue, transp=0, size=size.small, offset=-1)// Signal crosses zero lineplotshape(sQQEz and QQEzlong == 1 ? RsiMa – 50 : na, title=”QQE XZ Zero Cross Over”, style=shape.square, location=location.absolute, color=color.aqua, transp=0, size=size.small, offset=0)plotshape(sQQEz and QQEzshort == 1 ? RsiMa – 50 : na, title=”QQE XZ Zero Cross Under”, style=shape.square, location=location.absolute, color=color.fuchsia, transp=0, size=size.small, offset=0)hcolor=RsiMa-50>ThreshHold?color.green:RsiMa – 50 < 0 – ThreshHold ? color.red : color.orangeplot(FastAtrRsiTL – 50, color=color.blue, transp=0, linewidth=2)p1 = plot(RsiMa – 50, color=color.orange, transp=0, linewidth=2)plot(RsiMa – 50, color=hcolor, transp=50, style=plot.style_columns)hZero = hline(0, color=color.black, linestyle=hline.style_dashed, linewidth=1)hUpper = hline(ThreshHold, color=color.green, linestyle=hline.style_dashed, linewidth=2)hLower = hline(0 – ThreshHold, color=color.red, linestyle=hline.style_dashed, linewidth=2)fill(hUpper, hLower, color=color.gray, transp=80)//EOFbgc = RsiMa – 50 > ThreshHold ? color.green : Rsi – 50 < 0 – ThreshHold ? color.red : color.orangebarcolor(inpDrawBars ? bgc : na)06/25/2024 at 10:07 AM #234328Holà. Ici, vous avez l’indicateur traduit :
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127//-----------------------------------------------------////PRC_QQE Threshold//version = 0//27.06.24//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//-----------------------------------------------------////-----Inputs------------------------------------------//RsiPeriod=14 //Rsi LengthSF=5 //Rsi SmoothingQQE=4.238 //Fast QQE FactorThreshHold=10 //Thresh-holdsrc=close //Rsi SourceshowQQEx=1 //Show Smooth Rsi and QQE Signal crossesshowQQEz=1 //Show Smooth Rsi Zero crossesshowQQEc=1 //Show Smooth Rsi Thresh Hold Channel Exits//-----------------------------------------------------//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)*QQE//-----------------------------------------------------//longband=0shortband=0trend=0DeltaFastAtrRSI=darRsIndex=RsiManewShortBand=RsIndex+DeltaFastAtrRSInewLongBand=RsIndex-DeltaFastAtrRSI//-----------------------------------------------------//if RsIndex[1]>longband[1] and RsIndex>longband[1] thenlongband=max(longband[1],newlongband)elselongband=newlongbandendif//-----------------------------------------------------//if RsIndex[1]<shortband[1] and RsIndex<shortband[1] thenshortband=min(shortband[1],newshortband)elseshortband=newshortbandendif//-----------------------------------------------------//if RsIndex crosses over shortband[1] thentrend=1elsif longband[1] crosses over RsIndex thentrend=-1elsetrend=trend[1]endif//-----------------------------------------------------//if trend=1 thenFastAtrRsiTL=longbandelseFastAtrRsiTL=shortbandendif//-----------------------------------------------------//if showQQEx and FastAtrRsiTL < RsIndex thenQQExlong=QQExlong+1if QQExlong=1 thendrawtext("●︎",barindex[1],FastAtrRsiTL[1]-50)coloured("lime")endifelseQQExlong=0endifif showQQEx and FastAtrRsiTL > RsIndex thenQQExshort=QQExshort+1if QQExshort=1 thendrawtext("●︎",barindex[1],FastAtrRsiTL[1]-50)coloured("blue")endifelseQQExshort=0endif//-----------------------------------------------------//if showQQEz and RsIndex>=50 thenQQEzlong=QQEzlong+1if QQEzlong=1 thendrawtext("◼︎",barindex,RsiMa-50)coloured("aqua")endifelseQQEzlong=0endifif showQQEz and RsIndex<50 thenQQEzshort=QQEzshort+1if QQEzshort=1 thendrawtext("◼︎︎",barindex,RsiMa-50)coloured("fuchsia")endifelseQQEzshort=0endif//-----------------------------------------------------//if showQQEc and RsIndex>(50+ThreshHold) thenQQEclong=QQEclong+1if QQEclong=1 thendrawtext("▼",barindex,RsiMa-50+2)coloured("green")endifelseQQEclong=0endifif showQQEc and RsIndex<(50-ThreshHold) thenQQEcshort=QQEcshort+1if QQEcshort=1 thendrawtext("▲︎",barindex,RsiMa-50-2)coloured("red")endifelseQQEcshort=0endif//-----------------------------------------------------//if RsiMa-50 > ThreshHold thenr=0g=255b=0elsif RsiMa-50<-ThreshHold thenr=255g=0b=0elser=255g=127b=0endif//-----------------------------------------------------////-----------------------------------------------------//return (RsiMa-50) coloured(r,g,b)style(histogram,1),(FastAtrRsiTL-50) coloured("blue")style(line,2), (RsiMa-50) coloured(r,g,b)style(line,2), ThreshHold style(dottedline,2)coloured("green"),-ThreshHold style(dottedline,2)coloured("red"),0 style(dottedline,1)06/25/2024 at 10:58 AM #234330 -
AuthorPosts
Find exclusive trading pro-tools on