1) TrendReversal script for the buy and sell. It may look different from the script. I customized it to my style and strategy.
2) Hull Moving Average Turning Points and Concavity (2nd Derivatives) for the colored lines. I have set price=(H+L)/2, hma length = 2, and loopback=2.
@Rocky20 the chart setup and workspace are customized to my trading style. I have learned, put in the time, and TOS coding from this site. All are searchable and available here. My workspace came from here, develop piece by piece, and test what works best. Up to date, I check this site on "What's New" and scripts others are developing to better our trading lives. I am asking you to put time and effort to learn what works best for you. Usethinkscript.com has great knowledgeable and resourceful people here ready to help. But, you just have to search or ask the right question.
Try this @Asianraisin go to scan, select add filter, go to study, go to the tiny pencil on the right, hit delete, go to thinkscript editor on the top left, copy and paste the code above into it, change the aggregation to 1 minute at the very top left, hit okay, and scan, nothing will come up right now because market closed but you can now save this as a scan by ... clicking the little notebook next to "no matching symbols" click alert when scan results change, name your scan and you should be able to find it under your watchlist. In the morning things should pop up if it's working correctly. You can maybe find out early before the open if it is working by turning on the EXT next to the aggregation you've chosen.
11:45 Paris: Since there is considerable interest in volume studies in recent days, here's a volume spike alert that was posted some time back.
Code:
# Volume Spike Alert
# Student
# 12.17.2016
# Fires off an alert on a 6-10X volume spike, so you can catch a rocket early
def AvgVol = Average(volume, 6);
def VolX = (volume > AvgVol[1] * 6) and (volume < AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolXX = (volume > AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolUP = volume > AvgVol;
Alert(VolX, GetSymbolPart() + " has a large volume spike." + volume, Alert.BAR, Sound.Bell);
Alert(VolXX, GetSymbolPart() + " has a very large volume spike." + volume, Alert.BAR, Sound.Bell);
hey guys, probably know the answer but i have to ask just for reassurance, is it possible to to highlight or flag (mark) the stock that just triggered the volume alert?
hey guys, probably know the answer but i have to ask just for reassurance, is it possible to to highlight or flag (mark) the stock that just triggered the volume alert?
The closest you can get to what I think you're looking for is to set an alert on the scan query to trigger when symbols are added. The alert will appear in the Message Center, which isn't exactly attention grabbing. You can also have the alert send email and/or mobile push notification to the TOS mobile app so at least there's a notification sound.
@Slippage@Break Trader Want to make it more attention grabbing? You can detach the message center so the messages are front of you.
And/or scan query alerts can use custom sounds. 9 loud verses of "We're in the Money" is very attention grabbing although some family members may find it annoying (for trades going sideways, Lost In Space's Danger Danger Will Robinson on repeat is a great heads up!)
hey guys, probably know the answer but i have to ask just for reassurance, is it possible to to highlight or flag (mark) the stock that just triggered the volume alert?
@Break Trader, yes you can. I am assuming you want to flag or mark this on a watchlist. Hmm, an idea just popped in my head, a spike can be set with 1-minute aggregation and updates real-time with the RSI value real-time. Do you have the link or proper script for the volume spike. I've like to give it a try. @cabe1332
@Break Trader, yes you can. I am assuming you want to flag or mark this on a watchlist. Hmm, an idea just popped in my head, a spike can be set with 1-minute aggregation and updates real-time with the RSI value real-time. Do you have the link or proper script for the volume spike. I've like to give it a try. @cabe1332
I considered this, too. It's a valid idea if the list being shown isn't the result of the volume spike scan. If it's the result of that scan then all of the symbols will have the same state in that column. And, when re-running the scan or using the scan query as a watchlist you have no way to tell which symbols were only added on the most recent refresh, which is what was requested.
The only time the column would be useful on the scan's results is if the scan was run manually and the results are stale. When they stop being valid the column will change to reflect that.
I considered this, too. It's a valid idea if the list being shown isn't the result of the volume spike scan. If it's the result of that scan then all of the symbols will have the same state in that column. And, when re-running the scan or using the scan query as a watchlist you have no way to tell which symbols were only added on the most recent refresh, which is what was requested.
The only time the column would be useful on the scan's results is if the scan was running manually and the results are stale. When they stop being valid the column will change to reflect that.
Ok, give the script below a try. I added a ThumpsUP for volume spike. Add a volume column on the watchlist or scan using the script below. This will update real-time on a watchlist scan. Good luck! @cabe132
@Slippage@Break Trader Want to make it more attention grabbing? You can detach the message center so the messages are front of you.
And/or scan query alerts can use custom sounds. 9 loud verses of "We're in the Money" is very attention grabbing although some family members may find it annoying (for trades going sideways, Lost In Space's Danger Danger Will Robinson on repeat is a great heads up!)
In a watchlist, select a scan query not a static list.
Click where its name is again to get the menu and select Alert when scan results change
In the list of sounds there's an option at the bottom to edit custom sounds.
You can access the same custom sounds option when you manually set alerts on specific symbols.
As far as I can remember, there's no way to use custom sounds in chart alerts via studies.
@cabe1332 dont know who the author is of this script and havent had a chance to test it out and see if actually works, it look like it does, i havent had a chance to see it in action during trading hours though
Code:
Code:
def afterStart = secondsfromtime(0645)>=0;
def beforeEnd = secondstilltime(1245)>=0;
def vol_length = 30;
def AVGV = Average(volume, vol_length);
def lastNmins = (volume);
# scans for volume is greater than 500% of average volume
def conditionTrue = lastNmins > (AVGV * 5);
plot alert = afterStart and beforeEnd and
conditionTrue and conditionTrue[1] # volume increase
and ATR(2) > ATR() * 2; # price range increase
@cabe1332 dont know who the author is of this script and havent had a chance to test it out and see if actually works, it look like it does, i havent had a chance to see it in action during trading hours though
Code:
Code:
def afterStart = secondsfromtime(0645)>=0;
def beforeEnd = secondstilltime(1245)>=0;
def vol_length = 30;
def AVGV = Average(volume, vol_length);
def lastNmins = (volume);
# scans for volume is greater than 500% of average volume
def conditionTrue = lastNmins > (AVGV * 5);
plot alert = afterStart and beforeEnd and
conditionTrue and conditionTrue[1] # volume increase
and ATR(2) > ATR() * 2; # price range increase
@Break Trader I don't know who the author is, but I modified and tested script on multi-aggregation. It scans for volume spikes. You can change the percent as you like, additional scan filters to filter, and set a TOS watchlist alert for any new symbol adds. It works well and I will use it myself. Good luck! @cabe1332
# Volume Increase scan by X%
# Works on any aggregation
# @cabe1332
# add as a study on your scan
# you can change the percent as you wish
# you can set up a TOS watchlist alert for changes
# start code
input pctvolchg = 5; # ie. 5 = 500% x spike
input vol_length = 30;
def AVGV = Average(volume, vol_length);
def lastNmins = (volume);
# scans for volume is greater than 500% of average volume
def conditionTrue = lastNmins > (AVGV * pctvolchg);
plot scan = conditionTrue and conditionTrue[1]
and ATR(2) > ATR() * 2; # price range increase
I am trying to run this volume spike alert script and getting the following error:
"Exactly one plot expected"
Code:
# Volume Spike Alert
# Student
# 12.17.2016
# Fires off an alert on a 6-10X volume spike, so you can catch a rocket early
def AvgVol = Average(volume, 6);
def VolX = (volume > AvgVol[1] * 6) and (volume < AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolXX = (volume > AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolUP = volume > AvgVol;
Alert(VolX, GetSymbolPart() + " has a large volume spike." + volume, Alert.BAR, Sound.Bell);
Alert(VolXX, GetSymbolPart() + " has a very large volume spike." + volume, Alert.BAR, Sound.Bell);
@MacDude Thinkscript was created as a simple plotting language. So it assumes when you create a script that you are going to plot.
So we get it a plot and then we hide the plot. Everybody is happy
And these two lines to the bottom of your script:
The need for a plot can also be circumvented by using AddLabel() in place of plot... Either one will eliminate the error for Studies, Strategies, and Custom Watchlist Columns... Scans, however, do require a plot which returns 1 or either 0 or Double.NaN in order to return results... Alert() does not fire in Custom Watchlist Columns or Scans...
The need for a plot can also be circumvented by using AddLabel() in place of plot... Either one will eliminate the error for Studies, Strategies, and Custom Watchlist Columns... Scans, however, do require a plot which returns 1 or either 0 or Double.NaN in order to return results... Alert() does not fire in Custom Watchlist Columns or Scans...
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.
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.