Z-Score Upper Indicator for ThinkorSwim

@Rosalyn I just checked the link, there is nothing wrong with it.
I know there is nothing wrong with it but I can't seem to open the script when I click the link. It takes me to another URL page. I have TOS platform open but it does nothing. when it routes me to the other page.. I'm stuck
 
@Rosalyn scroll down a bit and you'll see a button that says "View in ThinkorSwim." Click on it.
 
@Rosalyn A new ThinkorSwim window should be opened. Please double check by hovering to the ThinkorSwim icon on your taskbar.
 
@Rosalyn A new ThinkorSwim window should be opened. Please double check by hovering to the ThinkorSwim icon on your taskbar.
Nothing opens, it keeps telling me if I want to open it on Xulu Platform or cancel request... Every time I try to open a link same issue...
 
@Rosalyn Go to your ToS > Setup > Open shared item... > paste the link

y7C8yqi.png
 
Thank you! I figured it out how to do this before I saw this... Still weird I can't open the link by clicking the link... oh well guess I'll have to do it manually. thx again :)
Something may have changed since the last TOS release because it doesn't work like it used to for me either... You used to be able to click on the Zulu prompt and then when you clicked back into TOS you would get a popup but that no longer happens... Copying the link and opening the shared link, as posted above, seems to be the only way to import until the old Zulu functionality is restored...
 
@chewie76 Thank you for creating this awesome indicator. how do i create the scan or watchlist column for this zscore buy and sell arrows. Your help will be much appreciated.
 
How does this indicator work on a daily time frame for swing trading?

Daybuck, Here is an example of NQ on the DAILY chart. It gives great signals HOWEVER, on a strong continuous uptrend, it will give false signals. It's a good swing trading tool.

ZUrFOG8.png
 
@chewie76 I am trying to comprehend how the lower indicator works. Would you mind giving me a short explanation of the lower indicator, the plots (histogram, signal line, and levels) and what constitutes a directional arrow that shows in the upper indicator? I would greatly appreciate it. I find there is something here that could compliment my trading as I rely heavily on standard deviations and mean reversions. For the life of me, I cannot decipher this lower indicator beyond its oscillations.
 
@chewie76 I am trying to comprehend how the lower indicator works. Would you mind giving me a short explanation of the lower indicator, the plots (histogram, signal line, and levels) and what constitutes a directional arrow that shows in the upper indicator? I would greatly appreciate it. I find there is something here that could compliment my trading as I rely heavily on standard deviations and mean reversions. For the life of me, I cannot decipher this lower indicator beyond its oscillations.
The lower indicator shows a standard deviation for each bar. When the bars cross the average line, that triggers the signal.
 
I also enabled and modified the momZAvg momentum code which provides me with additional indicators like crossovers... The code below is what I am currently using in place of the commented out line within several Zscore scripts out there... Whether it helps or not is still under review... It should be noted that my version of the Zscore code differs from that posted by Mobius, chewie76, and others...

Ruby:
input momZAvgLength = 13;
plot momZAvg = (avgZv - avgZv[momZAvgLength]);
momZAvg.assignValueColor(if momZAvg > momZAvg[1] then color.WHITE else color.DARK_ORANGE);
momZAvg.setPaintingStrategy(paintingStrategy.LINE);
momZAvg.setLineWeight(2);
momZAvg.HideBubble();

bogchnn.jpg


This is about the most clutter I can stand on a chart page but it gives me a lot of information to extrapolate...
 
TradingView version of this indicator for anyone interested. Converted by @egshih

57rgpfG.png


Code:
// ZScore Indicator
// Assembled by @chewie76 on UseThinkScript
// Modified for TradingView by egshih
// @version=4

study("Z-Score Indicator",overlay=true)
//Inputs
price = close
length = input(20)
ZavgLength = input(20)

//Initialize values
oneSD = stdev(price,length)
avgClose = sma(price,length)
ofoneSD = oneSD*price[1]
Zscorevalue = ((price-avgClose)/oneSD)
avgZv = sma(Zscorevalue,20)

//Compute and plot Z-Score
avgZscore = sma(Zscorevalue,ZavgLength)
Zscore = ((price-avgClose)/oneSD)

//Plot zero line and extreme bands
zero = 0
two = 2
one = 1
negone = -1
negtwo = -2
three = 3
negthree = -3

//Buy Conditions, currently set at 0.75
conditionbuy = crossover(Zscore,avgZscore) and avgZscore < -0.75
conditionsell = crossunder(Zscore,avgZscore)and avgZscore > 0.75

//Plot Buy and Sell Arrows
plotshape(conditionbuy, style=shape.arrowup, color=color.blue,location=location.belowbar, text="Buy ZScore")
plotshape(conditionsell, style=shape.arrowdown, color=color.orange,location=location.abovebar, text="Sell ZScore")
 
Here is the lower study in case anyone is interested for TradingView. Thanks @chewie76 @BenTen for all your contributions!

Code:
// ZScore Indicator
//Assembled by [USER=117]@chewie76[/USER] on UseThinkScript.com
//Link: https://usethinkscript.com/threads/z-score-upper-indicator-for-thinkorswim.3896/
//Modified for TradingView by egshih
//@version=4

study("Z-Score Indicator Lower",overlay=false)
//Inputs
price = close
length = input(20)
ZavgLength = input(20)

//Initialize values
oneSD = stdev(price,length)
avgClose = sma(price,length)
ofoneSD = oneSD*price[1]
Zscorevalue = ((price-avgClose)/oneSD)
avgZv = sma(Zscorevalue,20)

//Compute and plot Z-Score
avgZscore = sma(Zscorevalue,ZavgLength)
Zscore = ((price-avgClose)/oneSD)

//Plot ZScore

plot(avgZscore,title="AverageZScore",linewidth=1)

plot (Zscore, style=plot.style_histogram, color=Zscore>0?color.green:color.red)

//Plot zero line and extreme bands
zero = 0
two = 2
one = 1
negone = -1
negtwo = -2
three = 3
negthree = -3

plot(zero,title="0Line",color=color.yellow)
plot(two,title="2Line",color=color.red)
plot(one,title="1Line",color=color.orange)
plot(negone,title="-1Line",color=color.lime)
plot(negtwo,title="-2Line",color=color.green)

//Buy Conditions, currently set at 0.75
conditionbuy = crossover(Zscore,avgZscore) and avgZscore < -0.75
conditionsell = crossunder(Zscore,avgZscore)and avgZscore > 0.75

//Plot Buy and Sell Arrows
plotshape(conditionbuy, style=shape.arrowup, color=color.green,location=location.bottom, text="Buy")
plotshape(conditionsell, style=shape.arrowdown, color=color.red,location=location.top, text="Sell")


fillthree=hline(3)
filltwo=hline(2)
fillnegtwo=hline(-2)
fillnegthree=hline(-3)
//fill Cloud
fill(fillthree,filltwo,color=color.red)
fill(fillnegtwo,fillnegthree,color=color.green)
 

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