QQE Threshold

mtlyon23

New member
Is it possible that someone could code this QQE code. The original is by JustUncleL on trading view.
https://www.tradingview.com/script/34U0KMEK-QQE-MT4-Glaz-modified-by-JustUncleL/


//@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 = 0
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="DEMA" // Double Exponential
e = ema(src, len)
result := 2 * e - ema(e, len)
if type=="TEMA" // Triple Exponential
e = ema(src, len)
result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="VWMA" // Volume Weighted
result := vwma(src, len)
if type=="SMMA" // Smoothed
w = wma(src, len)
result := na(w[1]) ? sma(src, len) : (w[1] * (len - 1) + src) / len
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="LSMA" // Least Squares
result := linreg(src, len, lsma_offset)
if type=="ALMA" // Arnaud Legoux
result := 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 - ema8
result := pema
result

src = input(close, title="RSI Source")
//

//
Wilders_Period = RSI_Period * 2 - 1


Rsi = 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) * 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 := sQQEx and FastAtrRsiTL < RSIndex ? QQExlong + 1 : 0
QQExshort := sQQEx and FastAtrRsiTL > RSIndex ? QQExshort + 1 : 0
// Zero cross
QQEzlong = 0
QQEzlong := nz(QQEzlong[1])
QQEzshort = 0
QQEzshort := nz(QQEzshort[1])
QQEzlong := sQQEz and RSIndex >= 50 ? QQEzlong + 1 : 0
QQEzshort := sQQEz and RSIndex < 50 ? QQEzshort + 1 : 0
//
// Thresh Hold channel Crosses give the BUY/SELL alerts.
QQEclong = 0
QQEclong := nz(QQEclong[1])
QQEcshort = 0
QQEcshort := nz(QQEcshort[1])
QQEclong := sQQEc and RSIndex > 50 + ThreshHold ? QQEclong + 1 : 0
QQEcshort := sQQEc and RSIndex < 50 - ThreshHold ? QQEcshort + 1 : 0


// QQE exit from Thresh Hold Channel
plotshape(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 crosses
plotshape(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 line
plotshape(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.orange
plot(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)
//EOF

bgc = RsiMa - 50 > ThreshHold ? color.green : Rsi - 50 < 0 - ThreshHold ? color.red : color.orange
barcolor(inpDrawBars ? bgc : na)
 
Is it possible that someone could code this QQE code. The original is by JustUncleL on trading view.
https://www.tradingview.com/script/34U0KMEK-QQE-MT4-Glaz-modified-by-JustUncleL/


//@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 = 0
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="DEMA" // Double Exponential
e = ema(src, len)
result := 2 * e - ema(e, len)
if type=="TEMA" // Triple Exponential
e = ema(src, len)
result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="VWMA" // Volume Weighted
result := vwma(src, len)
if type=="SMMA" // Smoothed
w = wma(src, len)
result := na(w[1]) ? sma(src, len) : (w[1] * (len - 1) + src) / len
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="LSMA" // Least Squares
result := linreg(src, len, lsma_offset)
if type=="ALMA" // Arnaud Legoux
result := 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 - ema8
result := pema
result

src = input(close, title="RSI Source")
//

//
Wilders_Period = RSI_Period * 2 - 1


Rsi = 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) * 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 := sQQEx and FastAtrRsiTL < RSIndex ? QQExlong + 1 : 0
QQExshort := sQQEx and FastAtrRsiTL > RSIndex ? QQExshort + 1 : 0
// Zero cross
QQEzlong = 0
QQEzlong := nz(QQEzlong[1])
QQEzshort = 0
QQEzshort := nz(QQEzshort[1])
QQEzlong := sQQEz and RSIndex >= 50 ? QQEzlong + 1 : 0
QQEzshort := sQQEz and RSIndex < 50 ? QQEzshort + 1 : 0
//
// Thresh Hold channel Crosses give the BUY/SELL alerts.
QQEclong = 0
QQEclong := nz(QQEclong[1])
QQEcshort = 0
QQEcshort := nz(QQEcshort[1])
QQEclong := sQQEc and RSIndex > 50 + ThreshHold ? QQEclong + 1 : 0
QQEcshort := sQQEc and RSIndex < 50 - ThreshHold ? QQEcshort + 1 : 0


// QQE exit from Thresh Hold Channel
plotshape(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 crosses
plotshape(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 line
plotshape(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.orange
plot(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)
//EOF

bgc = RsiMa - 50 > ThreshHold ? color.green : Rsi - 50 < 0 - ThreshHold ? color.red : color.orange
barcolor(inpDrawBars ? bgc : na)

Here is something SyracusePro did awhile ago. Only change I made was to include an input for the TOS built-in average types instead of just exponential in his original.

Capture.jpg

Is it possible that someone could code this QQE code. The original is by JustUncleL on trading view.
https://www.tradingview.com/script/34U0KMEK-QQE-MT4-Glaz-modified-by-JustUncleL/


//@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 = 0
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="DEMA" // Double Exponential
e = ema(src, len)
result := 2 * e - ema(e, len)
if type=="TEMA" // Triple Exponential
e = ema(src, len)
result := 3 * (e - ema(e, len)) + ema(ema(e, len), len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="VWMA" // Volume Weighted
result := vwma(src, len)
if type=="SMMA" // Smoothed
w = wma(src, len)
result := na(w[1]) ? sma(src, len) : (w[1] * (len - 1) + src) / len
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="LSMA" // Least Squares
result := linreg(src, len, lsma_offset)
if type=="ALMA" // Arnaud Legoux
result := 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 - ema8
result := pema
result

src = input(close, title="RSI Source")
//

//
Wilders_Period = RSI_Period * 2 - 1


Rsi = 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) * 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 := sQQEx and FastAtrRsiTL < RSIndex ? QQExlong + 1 : 0
QQExshort := sQQEx and FastAtrRsiTL > RSIndex ? QQExshort + 1 : 0
// Zero cross
QQEzlong = 0
QQEzlong := nz(QQEzlong[1])
QQEzshort = 0
QQEzshort := nz(QQEzshort[1])
QQEzlong := sQQEz and RSIndex >= 50 ? QQEzlong + 1 : 0
QQEzshort := sQQEz and RSIndex < 50 ? QQEzshort + 1 : 0
//
// Thresh Hold channel Crosses give the BUY/SELL alerts.
QQEclong = 0
QQEclong := nz(QQEclong[1])
QQEcshort = 0
QQEcshort := nz(QQEcshort[1])
QQEclong := sQQEc and RSIndex > 50 + ThreshHold ? QQEclong + 1 : 0
QQEcshort := sQQEc and RSIndex < 50 - ThreshHold ? QQEcshort + 1 : 0


// QQE exit from Thresh Hold Channel
plotshape(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 crosses
plotshape(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 line
plotshape(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.orange
plot(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)
//EOF

bgc = RsiMa - 50 > ThreshHold ? color.green : Rsi - 50 < 0 - ThreshHold ? color.red : color.orange
barcolor(inpDrawBars ? bgc : na)

Ruby:
#===================== Syracusepro QQE Two Line =====================#
#============== Qualitative Quantitative Estimation =================#
declare lower;

input RSI_Period = 14;
input SF = 5;
input QQE = 4.236;
input avgtype = AverageType.EXPONENTIAL;
def Wilders_Period = RSI_Period * 2 - 1;

def Rsi = RSI(RSI_Period, close);
def RsiMa = MovingAverage(avgtype, Rsi, SF);
def AtrRsi = AbsValue(RsiMa[1] - RsiMa);
def MaAtrRsi = MovingAverage(avgtype, AtrRsi, Wilders_Period);
def dar = MovingAverage(avgtype, MaAtrRsi, Wilders_Period) * QQE;

def DeltaFastAtrRsi = dar;
def RSIndex = RsiMa;
def newshortband =  RSIndex + DeltaFastAtrRsi;
def newlongband = RSIndex - DeltaFastAtrRsi;
def longband = if RSIndex[1] > longband[1] and RSIndex > longband[1] then
 Max(longband[1], newlongband) else newlongband;

def shortband = if RSIndex[1] < shortband[1] and  RSIndex < shortband[1] then
 Min(shortband[1], newshortband) else newshortband;

def trend = if Crosses(RSIndex, shortband[1], CrossingDirection.ABOVE) then 1 else if Crosses(longband[1], RSIndex, CrossingDirection.BELOW) then -1  else (trend[1]);

def FastAtrRsiTL = if trend == 1 then longband else shortband;

plot frsi = FastAtrRsiTL;
frsi.SetDefaultColor(Color.RED);

plot rsiMov = RsiMa;
rsiMov.SetDefaultColor(Color.GREEN);
rsiMov.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

plot rsiMovP = rsiMov;
rsiMovP.AssignValueColor(if rsiMov >= frsi then Color.DARK_GREEN else Color.CURRENT);

plot topLine = 70;
topLine.SetStyle(Curve.MEDIUM_DASH);
topLine.SetDefaultColor(Color.YELLOW);

plot midleLine = 50;
midleLine.SetStyle(Curve.MEDIUM_DASH);
midleLine.SetDefaultColor(Color.YELLOW);

plot lowLine = 30;
lowLine.SetStyle(Curve.MEDIUM_DASH);
lowLine.SetDefaultColor(Color.YELLOW);

AddCloud(rsiMov, frsi, Color.DARK_GREEN);

AssignPriceColor(if rsiMov >= frsi then Color.GREEN else Color.RED);

rsiMov.HideBubble();
topLine.HideBubble();
midleLine.HideBubble();
lowLine.HideBubble();
#==================== End Syracusepro QQE Two Line =======================#
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
240 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top