Archived: QQE (Quantitative Qualitative Estimation) for ThinkorSwim

Status
Not open for further replies.

BenTen

Administrative
Staff member
Staff
VIP
Lifetime

These are the archived posts for the QQE. The current thread can be found:

https://usethinkscript.com/threads/qqe-quantitative-qualitative-estimation-for-thinkorswim.938/



QQE — or Quantitative Qualitative Estimation, is based on a rather complex calculation of the smoothed RSI indicators.

The QQE indicator consists of a smoothed Relative Strength Index (RSI) indicator and two volatility-based trailing levels (fast and slow). The Fast Trailing Level (TL) and Slow TL are constructed by calculating the ATR of the smoothed RSI over n-periods and then further smoothing the ATR using an additional n-periods Wilders smoothing function. This smoothed ATR of RSI is then multiplied by the Fast and Slow ATR Multipliers to calculate the final Fast and Slow Trailing Levels.

qLgSxk3.png

AFNqpDp.png


thinkScript Code

Code:
# QQE Indicator
# Converted by Kory Gill for BenTen at useThinkScript.com
# Original https://www.tradingview.com/script/zwbe2plA-Ghosty-s-Zero-Line-QQE/

declare lower;

input RSI_Period = 20;
input Slow_Factor = 5;
input QQE = 4.236;

def Wilder_Period = RSI_Period * 2 - 1;
def vClose = close;

def rsi = RSI(price = vClose, length = RSI_Period).RSI;
def rsi_ma = MovingAverage(AverageType.EXPONENTIAL, rsi, Slow_Factor);
def atr_rsi = AbsValue(rsi_ma[1] - rsi_ma);
def atr_rsi_ma = MovingAverage(AverageType.EXPONENTIAL, atr_rsi, Wilder_Period);
def dar = MovingAverage(AverageType.EXPONENTIAL, atr_rsi_ma, Wilder_Period) * QQE;

def DeltaFastAtrRsi = dar;
def RSIndex = rsi_ma;
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])
            then 1
            else if Crosses(longband[1], RSIndex)
            then -1
            else if !IsNAN(trend[1])
            then trend[1]
            else 1;

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

plot pFastAtrRsiTL = FastAtrRsiTL;
plot pRsiMa = rsi_ma;
plot line50 = 50;

pFastAtrRsiTL.SetDefaultColor(CreateColor(225,109,47));
pRsiMa.SetDefaultColor(CreateColor(113,225,180));

Learn more about the QQE indicator and how to trade it:
 
Last edited by a moderator:
Last edited:
I know the different alerts that can be set, what I'm asking is how to set an alert that is triggered and sent out to an email/text when the scanner is running and it should kick when the candle is showing crossing over/under with the QQE.
Are you asking how to set a scan alert?
YP6bWFb.png
 
Status
Not open for further replies.

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

Thread starter Similar threads Forum Replies Date
M QQE Threshold Questions 2
G Follow up with Original Code - QQE painting strat Help Questions 4
A Quantitative Momentum Model Screen Questions 2

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
269 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