Relative Volume Strategy and Momentum Scanner for ThinkorSwim

J

jezzer46

New member
That was another one whose exit I blew. I got in at $3.31 at the opening, watched it rise to $4.01, then — with all apologies to any programmer here, because you are the reason I've been able to find these stocks — I don't think Advanced Market Mover can keep up with screamers, because it gave me a reversal arrow, so I bailed at $3.77.

The good news is I'm getting better at picking winners; but I need to learn when to say goodbye!
Pull up the daily chart and mark last point of highs(use price level tool). Give you a good clue into what others are thinking. Most people see those levels so they react at them most of the time. on MTP you had $3.66 and then $4.61 and then $5.04 and last was $6.70. (all of them were hit btw)
 
S

Sonny

Active member
VIP
Thanks, Sonny. Been trying your watch list here this week. Got to make a nice little sum on riding MTP wave after it popped up on the watch list this morning. Cheers. :)
Glad to hear that you made some dough!
 
C

CDJay

New member
VIP
Pull up the daily chart and mark last point of highs(use price level tool). Give you a good clue into what others are thinking. Most people see those levels so they react at them most of the time. on MTP you had $3.66 and then $4.61 and then $5.04 and last was $6.70. (all of them were hit btw)
Thanks, man, that actually makes a lot of sense, because I admit I'm winging it!
 
G

Gabrielx77

Member
MTP looks great today! It showed up on my scan at 9:34 at $3.92. This is the ideal stock: Low Float (5M), Good catalyst, highest RV1, and VWAP break with smooth upward transition.
Hey Sonny, did you enter your trade on the bounce off of VWAP between 9:35-9:40 am on the 5m chart? I'm looking at the 1m chart and another entry point could have been at 9:35 for a pullback.
 
S

Sonny

Active member
VIP
Hey Sonny, did you enter your trade on the bounce off of VWAP between 9:35-9:40 am on the 5m chart? I'm looking at the 1m chart and another entry point could have been at 9:35 for a pullback.
Got it at 9:35 on the 1min pullback. I knew this would be great today based on all the positives like low float, catalyst, and highest RV1. Today, it was easy to pick MTP over the other gappers.
 
G

Gabrielx77

Member
Got it at 9:35 on the 1min pullback. I knew this would be great today based on all the positives like low float, catalyst, and highest RV1. Today, it was easy to pick MTP over the other gappers.
And I assume your stop loss would be at the break of the low of that pullback right? A stop loss at VWAP or the 9Day would be risking about 15%.
 
S

Sonny

Active member
VIP
@Gabrielx77

I am going out of town tomorrow for a few weeks so I won't be able to respond to questions until I get back. However, with this scan, you should be able to get more winners. Here are some key points. Track the top 2 or 3 premarket gappers. Focus on low float (<10M) with a good catalyst if possible. Then once a gapper comes up on my scan, focus on the chart setup. Look for stocks with bullish patterns like rounding bottom, VWAP break, or bullish flag/pennant. Also, stocks that rise gradually are better than fast spikes followed by fast drops. Finally, look at RV1 value. If the best stock has the highest RV1, then that is a big plus. Keep in mind that sometimes the best stock will not have the highest RV1 but if it does, then that is a plus. I noted that if the best stock has the highest RV1, it tends to do bounces off VWAP after the initial AM spike. EQ did the same thing on 7/13. Most of the time, one of the premarket gappers will hit my scan with a good setup and be the big winner. Then, sometimes, the AM gappers will fail and you have to pick one from the scan. Good luck with your trading!
 
S

Sonny

Active member
VIP
And I assume your stop loss would be at the break of the low of that pullback right? A stop loss at VWAP or the 9Day would be risking about 15%.
I tend to keep stop loss around 5% of my entry price. So if you buy at $3.80 then stop would be around $3.60. 15% stop is too high.
 
O

Orly

New member
Hello. How do you put this(Scanner)into the thinkscript editor. It keeps saying "invalid statement: Last at 1:1. and Invalid statement at 8:1. THANKS for your help!
 
S

Sonny

Active member
VIP
Hello. How do you put this(Scanner)into the thinkscript editor. It keeps saying "invalid statement: Last at 1:1. and Invalid statement at 8:1. THANKS for your help!
You need to click "Scan" at the top of TOS. Then put in the scan settings and save it. Put an alert when new symbols are added. Have it as a sidebar scan and use the color coded watchlist columns that I discussed in my other thread. Also helps to have the Message Center pulled up so you know when new symbols pop up. It showed IMRN yesterday and MTP today.
 
S

Sonny

Active member
VIP
@Gabrielx77 One last point to keep in mind. Don't feel compelled to trade every single day. Some days, there will not be a good stock to trade and it's best to not trade on such days. People lose money because they force trades or feel like they have to trade every single day. The key is to go for good stock setups but skip days where you don't feel comfortable with the stock or the setup.
 
M

malone1020

New member
VIP
Posted this in an After Hours RVOL thread, but this might be the better place:

I have ended up with three different Relative Volume Watchlist codes and am now confused how these differ. Anyone willing to help me decipher these three? Is it just as simple as 1 = 60 days benchmark, 2 = 50 days and 3 = 10 days?

Thank you!

1. -------------------------------

Code:
## OneNote Archive Name: Relative Volume to past days Average Relative Volume _v02_Mobius
## Suggested Tos Name using JQ naming convention: RelVolumeVsAvgRelVolume_v02_Mobius
## OneNote Section: Volume
## Archive Date: 02.10.2019
## Provenance: Posted by Mobius himself in the Lounge on 02.05.2019

## End OneNote Archive Header
# Relative Volume to past days Average Relative Volume
# Mobius
# Chat Room Request 01.23.2017

input length = 60;

def v = volume(period = AggregationPeriod.Day);
def active = if secondsFromTime(0930) > 0 and
secondsTillTime(1600) >= 0
then 1
else 0;
def Bars = Ceil((RegularTradingEnd(20190104) - RegularTradingStart(20190104))
/ GetAggregationPeriod());
def newDay = GetDay() != GetDay()[1];
def DayVol = if newDay
then v
else DayVol[1] + v;
def avgVolume = (fold day = 0 to length
with s
do s + GetValue(DayVol, day * Bars, (length - 1) * Bars)) / length;

plot R = DayVol / avgVolume * 100;
R.SetPaintingStrategy(PaintingStrategy.Histogram);
R.AssignValueColor(if R > 100
then color.green
else color.red);
# End Code
2. ------------------------------------------

Code:
# rvol watchlist column
# by [USER=1524]@huskytrader[/USER]
# 10-31-2019

def volumeAvgPeriodDays = 50;
def volumeAvg = (fold index=1 to volumeAvgPeriodDays+1 with acc=1 do acc+volume(period="DAY")[index]) / volumeAvgPeriodDays;

def volumeToday = volume(period="DAY");

plot a = Round((volumeToday / volumeAvg), 2);
3. ---------------------------------------------------------------------------------

Code:
input STime = 0930 ; #hint STime: Start of normal trading hours
input ETime = 1600 ; #hint ETime: End of normal trading hours
input thold = 1.5 ; #hint told: Threshold for color break
def bpd = 26 ; # Bars per day during active trading hours
def daycnt = 10; # Number of days

def IsActive = if secondsTillTime(ETime) > 0 and
secondsFromTime(STime) >= 0
then 1
else 0;


# This is the cumulative volume for the current day between STime and ETime
def cumVolume = if IsActive and !IsActive[1]
then volume[1]
else if IsActive then cumVolume[1] + volume[1]
else cumVolume[1];

# This is the average cumulative volume over the same time period from the previous 10 days
def cumVolumePrev = if IsActive and !IsActive[1]
then (volume[(bpd*1)+1] + volume[(bpd*2)+1] + volume[(bpd*3)+1] + volume[(bpd*4)+1] + volume[(bpd*5)+1] + volume[(bpd*6)+1] + volume[(bpd*7)+1] + volume[(bpd*8)+1] + volume[(bpd*9)+1] + volume[(bpd*10)+1] ) / daycnt
else if IsActive then cumVolumePrev[1] + (volume[(bpd*1)+1] + volume[(bpd*2)+1] + volume[(bpd*3)+1] + volume[(bpd*4)+1] + volume[(bpd*5)+1] + volume[(bpd*6)+1] + volume[(bpd*7)+1] + volume[(bpd*8)+1] + volume[(bpd*9)+1] + volume[(bpd*10)+1] ) / daycnt
else cumVolumePrev[1];

plot RelVol = cumVolume / cumVolumePrev ;

RelVol.assignValueColor(if RelVol > thold then CreateColor(0,128,0) else CreateColor(128,0,0) );
 
Last edited by a moderator:
S

Sonny

Active member
VIP
@malone1020 I think that the different codes show today's volume divided by different daily averages. One is 60 day average, one is 50 day, and one is 10 day. I feel that 60 day is best since it looks at 3 months. See my RV code in my thread, Color Coded Watchlist Columns.
 
G

Gabrielx77

Member
@Sonny Noted, thank you! I am very conservative when it comes to trading, so I'll definitely be paper trading with the way you explained how to look for the right stocks.
 
C

CDJay

New member
VIP
I will post another chart study that tracks Volume, RV from PM to a set time. You only have to change the endTime to get the value you want:

# Volume and RV at set time

input startTime = 0400;
input endTime = 0945;

def Active = SecondsFromTime(startTime) >= 0 and SecondsTillTime(endTime) >= 0;
def Vol2 = if Active and !Active[1] then volume
else if Active then Vol2[1] + volume
else Vol2[1];
AddLabel(1, "Volume: " + Vol2, Color.YELLOW);

def x1 = Average(volume(period = AggregationPeriod.DAY)[1], 60);
def x2 = Round((Vol2 / x1), 1);
AddLabel(1, "RV: " + x2, Color.PINK);
Addlabel(1, "Time: " + endTime, color.GREEN);
Sonny, I realize you'll be out of town, so first thank you for all your help; there's little doubt the three days I've used your scans have been my best overall.

I also wanted to ask you about this, so I didn't forget by the time you return. You've said it's difficult (impossible?) to get relative volume in pre-market, so is this an attempt at a workaround?
 
S

Sonny

Active member
VIP
@CDJay Actually, this is more for looking back on RV and volume to see the values. The best live values will be the RV column code in my other thread and my volume chart label.

The best premarket relative volume estimate is my chart label and the latest version is page 4 of Useful Intraday Chart Labels.

I realize this is off topic but I have certain songs that motivate me to do well in trading: (artist, title)

Pet Shop Boys, Opportunities
ABC, Millionaire song
Warrant, DRFSR
Twisted Sister, We're Gonna Make It
Motley Crue, Keep your eye on the money
Twisted Sister, I Wanna Rock
Warrant, Big Talk
Lita Ford, Larger Than Life

Check them out on Youtube if you get a chance and let me know what you think.
 
Last edited by a moderator:
R

RickAns

Member
Sonny, your watch list scanner had me smiling this morning. I like to watch Trader TV Live in the mornings via youtube. Great channel I like their energy and willingness to teach trading as they trade. There was several times this morning that as soon as a stock popped up on the watch list within seconds later the channel broke in with news of that exact stock breaking new highs / volume! Forget exactly what they said. MXC was mentioned and I can't remember the other one or two.

Just thought it neat and wanted to share. I am really liking this code you have shared. Just found it the past weekend and started using it this week. Many thanks.

Added:
Hope you have a nice trip.
 
Last edited:
J

jezzer46

New member
MXC was a thing of beauty. No coincidence that it is the leading rv1. Just a little patience was needed for this one and it paid off big time. I myself hate trading over anything over $10 but that is where the money tends to flow better.

Sonny you really unlocked something amazing here. Great Work!
 
L

Learnbot

Member
quick question guys/gals, is there a way to see when the ticker was populated in a watchlist? i mean I have 9-5 job so I am not always on top of the watchlist so I wanted to see if let's say MXC for today poped on my watchlist is there a way to add a timestamp to it to see when the scanner conditions were met to generate MXC ticker?
 
Top