QQE/RSI Indicator For ThinkOrSwim

mbarcala

Active member
I bring here a combination of two good indicators as the QQE/RSI. I saw few ideas like this online and I really like them when they get combined, it gives you a nice entry points if you want to use it. As I always said if you try it, post some feedbacks or comments!

QQE signal it's represent by a white line and RSI as Histogram with color levels!

Updates:
I updated more the QQE/RSI indicator so you can understand more since I moved from the original range to have 0 in the middle line.
I updated the QQE Signal so you can see when the fast lane cross with the QQE.

RSI level: 20 = 70 and 30 = 80.

Upper Indicator here: https://usethinkscript.com/threads/break-keltner-bands-bkb-for-thinkorswim.11220/
Photos

14754[/ATTACH]']
0a0RODs.png

Do7n2El.png


script
Code:
# QQE/RSI Indicator by mbarcala

declare lower;

input RSI_Period = 20;
input Slow_Factor = 5;
input length = 14;
input level1 = 20;
input level2 = 30;

def RSIndex = 4.236;
def Wilder_Period = RSI_Period * 2 - 1;
def rsi = RSI(price = close, length = RSI_Period).RSI;

plot QQE = ExpAverage(rsi, Slow_Factor) - 50;
QQE.SetDefaultColor(Color.WHITE);
QQE.SetLineWeight(3);
QQE.HideBubble();
QQE.HideTitle();

def atr_rsi = AbsValue(QQE[1] - QQE);
def atr_rsi_ma = ExpAverage(atr_rsi, Wilder_Period);
def DeltaFastAtrRsi = ExpAverage(atr_rsi_ma, Wilder_Period) * RSIndex;
def newshortband =  QQE + DeltaFastAtrRsi;
def newlongband = QQE - DeltaFastAtrRsi;

def longband = if QQE[1] > longband[1] and QQE > longband[1] then max(longband[1],newlongband) else newlongband;
def shortband = if QQE[1] < shortband[1] and  QQE < shortband[1] then min(shortband[1], newshortband) else newshortband;
def trend = if Crosses(QQE, shortband[1]) then 1 else if Crosses(longband[1], QQE) then -1 else if !IsNAN(trend[1]) then trend[1] else 1;

plot Zero = 0;
Zero.SetDefaultColor(Color.BLACK);
Zero.SetLineWeight(2);

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

#### RSI2 #####
def NetChgAvg = WildersAverage(close - close[1], length);
def TotChgAvg = WildersAverage(AbsValue(close - close[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

plot RSI2 = 50 * (ChgRatio + 1) - 50;
RSI2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RSI2.AssignValueColor(if RSI2 > 3 and RSI2 < level1 then CreateColor(0,198,244) else
                      if RSI2 >= level1 and RSI2 < level2 then CreateColor(0,101,255) else
                      if RSI2 >= level2 then Color.BLUE else
                      if RSI2 < -3 and RSI2 > -level1 then CreateColor(204,0,98) else
                      if RSI2 <= -level1 and RSI2 > -level2 then Color.DARK_RED else
                      if RSI2 <= -level2 then Color.PLUM else Color.DARK_GRAY);
RSI2.SetLineWeight(5);
#### RSI END #####

plot upSign = if QQE crosses above pFastAtrRsiTL then QQE else Double.NaN;
upSign.SetPaintingStrategy(PaintingStrategy.POINTS);
upSign.SetDefaultColor(Color.GREEN);
upSign.SetLineWeight(5);

plot dnSign = if QQE crosses below pFastAtrRsiTL then QQE else Double.NaN;
dnSign.SetPaintingStrategy(PaintingStrategy.POINTS);
dnSign.SetDefaultColor(Color.RED);
dnSign.SetLineWeight(5);
 

Attachments

  • 0a0RODs.png
    0a0RODs.png
    111.7 KB · Views: 167
Last edited by a moderator:
Hi mbarcala, I am very interested in your updated script. I read the history on QQERSI from the links you previously provided. My charts look different than the ones above for BABA and AAPl. Your charts posted above look different from each other too. Is the script the same for each? What is the preferred new script you are suggesting? Many thanks.

here is a zoom screen shot . Maybe I am not using the correct script. I used the one above
 
Hi mbarcala, I am very interested in your updated script. I read the history on QQERSI from the links you previously provided. My charts look different than the ones above for BABA and AAPl. Your charts posted above look different from each other too. Is the script the same for each? What is the preferred new script you are suggesting? Many thanks.
Yes it's the same script. I only add the different levels that normally it's use on the RSI and QQE as OverSold and OverBought represented by color. Probably you looking at the end of you graphic and when I take the photos I was not at that point on my graphic that's all.

Not able able to see much from your image! I presume that you have the chart in daily candles, but remember that 8/4/21 is going to be only one candle and depending where you have the day more to the left or the right on your screen it could look different. Any way is possible to look better if you leave the chart with the QQE/RSI indicator only for the photo I mean, so I can see in your chart better because in that photo the chart is to compress an I can't compare nothing with my BABA photo

here is a zoom screen shot . Maybe I am not using the correct script. I used the one above
ok I think understand you now! here is the Upper Indicator I have in the photo.

Upper Indicator here: https://usethinkscript.com/threads/break-keltner-bands-bkb-for-thinkorswim.11220/

About the bottom indicator copy and paste the one above again in case that you keep seeing some deferents but it not support to be!
 
Last edited by a moderator:
@TechGuy
Your post about your indicator looking different was not true.
Please see my comparison of your indicator with the OP's.

The images are identical:
NCB6zMJ.png
ZeLH402.jpg
 

Attachments

  • NCB6zMJ.png
    NCB6zMJ.png
    5.4 KB · Views: 364
Last edited:
The RSI itself looks interesting - is there a way to scan for the RSI values / upsigns, etc.? Thank you for this contribution (and so many others)
 
Hi MerryDay, I thought RSI and QQE are very similar (QQE is a fancy or better version of RSI), we don't want to the same category of indicators if one could help it?
 
Last edited by a moderator:
Hi MerryDay, I thought RSI and QQE are very similar (QQE is a fancy or better version of RSI), we don't want to the same category of indicators if one could help it?
It works for the OP.
Collinearity doesn’t mean you never use same-type, non-repainting indicators. Same-type indicators can be useful in weeding out false signals of any one indicator. But you then still need a different type of indicator for confirmation of entry.
When using Trend/Momentum Indicators and Bands such as these, try combining with a Cycle Indicator such as Market Phase or ToS Chaiken. Never forget your support & demand.
And always, always review multi-timeframes. Higher to get an overall picture and make sure you aren't trading on noise. A lower to find entry.
Lastly, always have a stop-loss.
https://usethinkscript.com/threads/...nt-to-successful-trading-in-thinkorswim.6114/
 
Last edited:
Hi mbarcala, thanks for looking at my zoom shot and showing there is not a difference. Now I can proceed knowing I have the correct script. I am also going to paste the script for the upper indicator. Many thanks for your help and fast replies.

I pasted your script for the upper indicator into my system. Is this the same script for the upper chart for AAPL for 10/21/20 with the blue bars and little o's?

how I set this up like you did to appear in the upper price chart. Thanks

Many thanks for the upper chart script. I was looking at the script and perhaps you can help me on what a blue bar means with a dot above or below. And how do I use this upper chart in conjunction with the bottom chart with the QQERSI indicator. Sorry for all the questions but these indicators appear to be helpful along with my various volume indicators. Thanks.
 
Last edited by a moderator:
Hi mbarcala, thanks for looking at my zoom shot and showing there is not a difference. Now I can proceed knowing I have the correct script. I am also going to paste the script for the upper indicator. Many thanks for your help and fast replies.

I pasted your script for the upper indicator into my system. Is this the same script for the upper chart for AAPL for 10/21/20 with the blue bars and little o's?
Yes it's the same script on apple too

Can you help me on the right script and how I set this up like you did to appear in the upper price chart. Thanks
Is easy, copy and paste the code from this link here below and it will look exactly the same
Indicator link: https://usethinkscript.com/threads/break-keltner-bands-bkb-for-thinkorswim.11220/

Many thanks for the upper chart script. I was looking at the script and perhaps you can help me on what a blue bar means with a dot above or below. And how do I use this upper chart in conjunction with the bottom chart with the QQERSI indicator. Sorry for all the questions but these indicators appear to be helpful along with my various volume indicators. Thanks.
The blue candles represent the price crossing the EMA (in my case I use 20ema), the small points on top or bottom of the candles tell you in what direction the price it's going. if the price crossing down the 20ema the point will show on top of the candle and vise versa.
 
I bring here a combination of two good indicators as the QQE/RSI. I saw few ideas like this online and I really like them when they get combined, it gives you a nice entry points if you want to use it. As I always said if you try it, post some feedbacks or comments!

QQE signal it's represent by a white line and RSI as Histogram with color levels!

Updates:
I updated more the QQE/RSI indicator so you can understand more since I moved from the original range to have 0 in the middle line.
I updated the QQE Signal so you can see when the fast lane cross with the QQE.

RSI level: 20 = 70 and 30 = 80.

Upper Indicator here: https://usethinkscript.com/threads/break-keltner-bands-bkb-for-thinkorswim.11220/
Photos

15449[/ATTACH]']
0a0RODs.png

Do7n2El.png


script
Code:
# QQE/RSI Indicator by mbarcala

declare lower;

input RSI_Period = 20;
input Slow_Factor = 5;
input length = 14;
input level1 = 20;
input level2 = 30;

def RSIndex = 4.236;
def Wilder_Period = RSI_Period * 2 - 1;
def rsi = RSI(price = close, length = RSI_Period).RSI;

plot QQE = ExpAverage(rsi, Slow_Factor) - 50;
QQE.SetDefaultColor(Color.WHITE);
QQE.SetLineWeight(3);
QQE.HideBubble();
QQE.HideTitle();

def atr_rsi = AbsValue(QQE[1] - QQE);
def atr_rsi_ma = ExpAverage(atr_rsi, Wilder_Period);
def DeltaFastAtrRsi = ExpAverage(atr_rsi_ma, Wilder_Period) * RSIndex;
def newshortband =  QQE + DeltaFastAtrRsi;
def newlongband = QQE - DeltaFastAtrRsi;

def longband = if QQE[1] > longband[1] and QQE > longband[1] then max(longband[1],newlongband) else newlongband;
def shortband = if QQE[1] < shortband[1] and  QQE < shortband[1] then min(shortband[1], newshortband) else newshortband;
def trend = if Crosses(QQE, shortband[1]) then 1 else if Crosses(longband[1], QQE) then -1 else if !IsNAN(trend[1]) then trend[1] else 1;

plot Zero = 0;
Zero.SetDefaultColor(Color.BLACK);
Zero.SetLineWeight(2);

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

#### RSI2 #####
def NetChgAvg = WildersAverage(close - close[1], length);
def TotChgAvg = WildersAverage(AbsValue(close - close[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

plot RSI2 = 50 * (ChgRatio + 1) - 50;
RSI2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RSI2.AssignValueColor(if RSI2 > 3 and RSI2 < level1 then CreateColor(0,198,244) else
                      if RSI2 >= level1 and RSI2 < level2 then CreateColor(0,101,255) else
                      if RSI2 >= level2 then Color.BLUE else
                      if RSI2 < -3 and RSI2 > -level1 then CreateColor(204,0,98) else
                      if RSI2 <= -level1 and RSI2 > -level2 then Color.DARK_RED else
                      if RSI2 <= -level2 then Color.PLUM else Color.DARK_GRAY);
RSI2.SetLineWeight(5);
#### RSI END #####

plot upSign = if QQE crosses above pFastAtrRsiTL then QQE else Double.NaN;
upSign.SetPaintingStrategy(PaintingStrategy.POINTS);
upSign.SetDefaultColor(Color.GREEN);
upSign.SetLineWeight(5);

plot dnSign = if QQE crosses below pFastAtrRsiTL then QQE else Double.NaN;
dnSign.SetPaintingStrategy(PaintingStrategy.POINTS);
dnSign.SetDefaultColor(Color.RED);
dnSign.SetLineWeight(5);
Is it possible to run a scan for red or green signals? Thanks
 

Attachments

  • 0a0RODs.png
    0a0RODs.png
    111.7 KB · Views: 122
Is it possible to run a scan for red or green signals? Thanks
here it's the scanner
Code:
def RSI_Period = 20;
def Slow_Factor = 5;
def RSIndex = 4.236;
def Wilder_Period = RSI_Period * 2 - 1;
def rsi = RSI(price = close, length = RSI_Period);

def QQE = ExpAverage(rsi, Slow_Factor);

def atr_rsi = AbsValue(QQE[1] - QQE);
def atr_rsi_ma = ExpAverage(atr_rsi, Wilder_Period);
def DeltaFastAtrRsi = ExpAverage(atr_rsi_ma, Wilder_Period) * RSIndex;
def newshortband =  QQE + DeltaFastAtrRsi;
def newlongband = QQE - DeltaFastAtrRsi;
def longband = if QQE[1] > longband[1] and QQE > longband[1] then max(longband[1],newlongband) else newlongband;
def shortband = if QQE[1] < shortband[1] and  QQE < shortband[1] then min(shortband[1], newshortband) else newshortband;
def trend = if Crosses(QQE, shortband[1]) then 1 else if Crosses(longband[1], QQE) then -1 else if !IsNAN(trend[1]) then trend[1] else 1;

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

#Upper Scan
plot upSign = QQE crosses above pFastAtrRsiTL;

#Down Scan
#plot dnSign = QQE crosses below pFastAtrRsiTL;
for Down scanner delete the # from "down scan" and place one # in Upper scan in way to create another scanner
 
here it's the scanner
Code:
def RSI_Period = 20;
def Slow_Factor = 5;
def RSIndex = 4.236;
def Wilder_Period = RSI_Period * 2 - 1;
def rsi = RSI(price = close, length = RSI_Period);

def QQE = ExpAverage(rsi, Slow_Factor);

def atr_rsi = AbsValue(QQE[1] - QQE);
def atr_rsi_ma = ExpAverage(atr_rsi, Wilder_Period);
def DeltaFastAtrRsi = ExpAverage(atr_rsi_ma, Wilder_Period) * RSIndex;
def newshortband =  QQE + DeltaFastAtrRsi;
def newlongband = QQE - DeltaFastAtrRsi;
def longband = if QQE[1] > longband[1] and QQE > longband[1] then max(longband[1],newlongband) else newlongband;
def shortband = if QQE[1] < shortband[1] and  QQE < shortband[1] then min(shortband[1], newshortband) else newshortband;
def trend = if Crosses(QQE, shortband[1]) then 1 else if Crosses(longband[1], QQE) then -1 else if !IsNAN(trend[1]) then trend[1] else 1;

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

#Upper Scan
plot upSign = QQE crosses above pFastAtrRsiTL;

#Down Scan
#plot dnSign = QQE crosses below pFastAtrRsiTL;
for Down scanner delete the # from "down scan" and place one # in Upper scan in way to create another scanner
Can you help on deletion? Both # upper and # Down remain in the UP SCAN? what does the new DOWN SCAN look like after your suggestions?
 
Can you help on deletion? Both # upper and # Down remain in the UP SCAN? what does the new DOWN SCAN look like after your suggestions?
scanner only support one plot at the time, that's why if you have Up scanner open you have to comment with # symbol the Down scanner and vice versa. Up scanner scan up signal and Down scanner scan down signal.
 
scanner only support one plot at the time, that's why if you have Up scanner open you have to comment with # symbol the Down scanner and vice versa. Up scanner scan up signal and Down scanner scan down signal.
The up scan works. But down scan script keeps says error. I dont think I deleted the # in the proper place. Can you show me the script for the down? Thanks
 
The up scan works. But down scan script keeps says error. I dont think I deleted the # in the proper place. Can you show me the script for the down? Thanks
to scan the down signal you create a new scan and take away the # from here
Code:
plot dnSign = QQE crosses below pFastAtrRsiTL;

and add one # in here -->
Code:
plot upSign = QQE crosses above pFastAtrRsiTL;
you can not have 2 plot at the same time.
 
to scan the down signal you create a new scan and take away the # from here
Code:
plot dnSign = QQE crosses below pFastAtrRsiTL;

and add one # in here -->
Code:
plot upSign = QQE crosses above pFastAtrRsiTL;
you can not have 2 plot at the same time.
I got it to work!!!! Is there a way to SCAN for the various colors like plum or grey?
 

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
313 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