Color coded watchlist columns for ThinkorSwim

S

Sonny

Active member
VIP
@tradeking313 Ok, I fixed it now; should work. However, TOS does not keep track of premarket volume so you can't really compare those values.
 
T

tradeking313

Member
@Sonny one more question. Is there a way we can create a watchlist column where it calculates the premarket volume divided by previous day volume?
 
S

Sonny

Active member
VIP
@Sonny one more question. Is there a way we can create a watchlist column where it calculates the premarket volume divided by previous day volume?
Sure. Try this code:

Code:
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMV = if IsNaN(vol) then PMV[1] else vol;
def AV = AggregationPeriod.DAY;
def x = Volume(period=AV)[1];
def y1 = Round((PMV/x),2);
def L = Lg(y1);
def p = if L>=1 then 0 else if L>=0 then 1 else 2;
def y2 = Round(y1,p);
plot z = y2;
z.assignValueColor(if z>=10 then color.CYAN else if z>=1 then createcolor(255,153,153) else createcolor(0,215,0));
 
T

thealphabreed

Member
I have developed color coded watchlist columns which can be very helpful, especially when looking at a gap scan on the left while tracking charts on the right. These are color coded based on values. The columns eliminate all those extra zeros at the end and make it easy to spot big values. The codes are listed below. Please pass it on!

Cyan - highest
Red - 2nd highest
Green - 3rd highest
Yellow - lowest

C1 – <20, 20-40, >40
CO – <0, 0-20, 20-40, >40
L1 – 1-5, 5-10, >10
RV1 – 0-5, 5-20, >20

C1
#Pct Change from Yesterday Close
def AP = AggregationPeriod.DAY;
def y = close(period = AP)[1];
def x = Round(100*((close/y)-1),1);
plot z=x;
z.assignValueColor(if z>=40 then color.CYAN else if z>=20 then createcolor(255,153,153) else createcolor(0,215,0));

CO
#Percent change from open
plot x = Round(100*((close/open)-1),1);
x.assignValueColor( if x >=40 then color.CYAN else if x>=20 then createcolor(255,153,153) else if x>=0 then createcolor(0,215,0) else color.YELLOW);

L1
#Rounded Last
def L = Round(close,2);
plot x = L;
x.assignValueColor(if x>=10 then color.CYAN else if x>=5 then createcolor(255,153,153) else createcolor(0,215,0));

RV1
#Relative Volume
def x = Average(volume, 60)[1];
def v = volume;
plot r = Round((v/x),1);
r.assignValueColor(if r >= 20 then color.CYAN else if r>=5 then createcolor(255,153,153) else createcolor(0,215,0));
i Cant find an option to add this in ThinkorSwim, Can you direct?
 
S

Sonny

Active member
VIP
i Cant find an option to add this in ThinkorSwim, Can you direct?
The columns can added by going to a Scan and click the gear icon at the top right and click Customize. Then scroll down to Custom under Available Items. Click on a Custom scroll and copy and paste the code for each item under different Custom Scrolls and label them.
 
R

Rodger

New member
Hi, Sonny, very appreciate your program. I have a question: this relative volume cauculation is based on what time frame? should I use daily or 1 minute volume & Average(volume, 60) for counting? thank you
 
S

Sonny

Active member
VIP
Hi, Sonny, very appreciate your program. I have a question: this relative volume cauculation is based on what time frame? should I use daily or 1 minute volume & Average(volume, 60) for counting? thank you
The RV calculation is (today's volume) / (60 day average daily volume). When you put in the column code, make sure you mark D for day for next to Column Name.
 
R

Rodger

New member
The RV calculation is (today's volume) / (60 day average daily volume). When you put in the column code, make sure you mark D for day for next to Column Name.
Hi, Sonny, thank you very much for your explanation. Your ideas is: based on this RV ranking after 9:30 am(like in first 5 minutes) , several top-RV-ratio stocks are high-probability targets to trade after they have pull back, right? that;s because where the huge money flow in, right?
 
S

Sonny

Active member
VIP
Hi, Sonny, thank you very much for your explanation. Your ideas is: based on this RV ranking after 9:30 am(like in first 5 minutes) , several top-RV-ratio stocks are high-probability targets to trade after they have pull back, right? that;s because where the huge money flow in, right?
Yes. High RV1 stocks are likely to spike but not guaranteed.Track the top 3 RV1 stocks and enter if good setups present. Also it is best to set alerts on the momentum scan to pick up early runners. Today BOXL showed up and yesterday was ANTE.
 
V

vikram

New member
VIP
@Sonny: Does this watch list work only when the market is opening at 9:30 or if I check at 8:30 AM EDT it compares present pre market volume with last 60 days total volume ?
 
S

Sonny

Active member
VIP
@Sonny: Does this watch list work only when the market is opening at 9:30 or if I check at 8:30 AM EDT it compares present pre market volume with last 60 days total volume ?
The columns only work after 9:30. If you want premarket relative volume, then see my thread called Useful Intraday Stats at page 4.
 
R

Rodger

New member
Hi @Sonny, thank you so much for your further explanation. Still about strong momentum stock: according to your idea, the strongest stocks (with highest RV) should be like: close>yesterday‘s close(such as %change>10%) and close >= (open*1.05), right?

The below code was selected from your intraday stats to address premarket relative volume as watchlist colume. Do you think its correct? thank you very much for your instructions.

Code:
#Relative Volume
def AV = AggregationPeriod.DAY;
def x1 = Average(volume(period = AV)[1], 50);
def v1 = volume(period = AV);
def z1 = v1 / x1;
def z2 = if Lg(z1) >= 2 then 0 else 1;

def h = high;
def v = volume;
def bar = BarNumber();
def GlobeX = GetTime() < RegularTradingStart(GetYYYYMMDD());

#Premarket Volume
def vol = if GlobeX and !GlobeX[1] then v else if GlobeX then vol[1] + v else Double.NaN;
def L2 = RoundDown(Lg(vol), 0);
def C1 = if L2 > 4.5 and L2 < 5.5 then 1 else 0;

#Premarket Relative Volume
plot z3 = vol / x1;
 
S

Sonny

Active member
VIP
Hi @Sonny, thank you so much for your further explanation. Still about strong momentum stock: according to your idea, the strongest stocks (with highest RV) should be like: close>yesterday‘s close(such as %change>10%) and close >= (open*1.05), right?

The below code was selected from your intraday stats to address premarket relative volume as watchlist colume. Do you think its correct? thank you very much for your instructions.

Code:
#Relative Volume
def AV = AggregationPeriod.DAY;
def x1 = Average(volume(period = AV)[1], 50);
def v1 = volume(period = AV);
def z1 = v1 / x1;
def z2 = if Lg(z1) >= 2 then 0 else 1;

def h = high;
def v = volume;
def bar = BarNumber();
def GlobeX = GetTime() < RegularTradingStart(GetYYYYMMDD());

#Premarket Volume
def vol = if GlobeX and !GlobeX[1] then v else if GlobeX then vol[1] + v else Double.NaN;
def L2 = RoundDown(Lg(vol), 0);
def C1 = if L2 > 4.5 and L2 < 5.5 then 1 else 0;

#Premarket Relative Volume
plot z3 = vol / x1;
This code only works as a chart study but not as a column code. I will update it once I figure it out.
 
S

Sonny

Active member
VIP
@Sonny: Does this watch list work only when the market is opening at 9:30 or if I check at 8:30 AM EDT it compares present pre market volume with last 60 days total volume ?
The watchlist columns only work after 9:30. If you want premarket relative volume, then see my thread, Useful Intraday Stats, page 4.
 
CDJay

CDJay

Member
VIP
Hey @Sonny, I don't know if you follow the NBA, but Paul Pierce once had a great game against the Lakers, leading to Shaquille O'Neal saying afterward, "That Paul Pierce, he's the bleeping truth!" After that, Paul Pierce was known as The Truth, so I say, "That Sonny, he's the bleeping truth!"

I customized the columns in the watchlist for your low float stocks, then brought up your pre-market watchlist and changed those columns, and clicked OK. But when I went back to the low float stocks, they had the Mark Change % and Mark columns. I assumed that customizing and clicking OK would have saved the settings for each, but I must have done something wrong. Should they be saving separately?

I've had some ideas that I've been trying to get my programmer buddy to do for us, but he either doesn't have the time or won't help until I give better stock tips. Basically, we all want to beat the curve, so I've had the thought of being alerted when a stock has one, two or three green bars — not sure of the number — when they're hitting X volume. Is that essentially what your gap scans do, particularly when utilizing the alerts?

The second thought is would it be useful to incorporate proximity to the day's high or year's high, since stocks can sometimes run after pushing through those barriers?
 
S

Sonny

Active member
VIP
Hey @Sonny, I don't know if you follow the NBA, but Paul Pierce once had a great game against the Lakers, leading to Shaquille O'Neal saying afterward, "That Paul Pierce, he's the bleeping truth!" After that, Paul Pierce was known as The Truth, so I say, "That Sonny, he's the bleeping truth!"

I customized the columns in the watchlist for your low float stocks, then brought up your pre-market watchlist and changed those columns, and clicked OK. But when I went back to the low float stocks, they had the Mark Change % and Mark columns. I assumed that customizing and clicking OK would have saved the settings for each, but I must have done something wrong. Should they be saving separately?

I've had some ideas that I've been trying to get my programmer buddy to do for us, but he either doesn't have the time or won't help until I give better stock tips. Basically, we all want to beat the curve, so I've had the thought of being alerted when a stock has one, two or three green bars — not sure of the number — when they're hitting X volume. Is that essentially what your gap scans do, particularly when utilizing the alerts?

The second thought is would it be useful to incorporate proximity to the day's high or year's high, since stocks can sometimes run after pushing through those barriers?
Actually, I love basketball. I remember Pierce as a Kansas Jayhawk to winning the title with Allen, Garnett as a Celtic.

As far as the color columns, you should use them on the small watchlists on the left side when watching charts. Same with the premarket list; put in the mark, mark % change, and volume on the small watchlist.

My momentum scans look for stocks that are gapping up, with high relative volume, and positive change from open. I have 2 scans, for low and high float stocks. These scans help identify stocks early before they make big runs. Once a stock pops up on the scan, you have to assess it. Stocks that have a gradual rise, smooth uptrending VWAP are good. A good entry is pullback to VWAP or 9EMA. BOXL was a good example on the low float scan and HTBX, HMHC on the high float scans.

You can put the 52week high as a chart label. See my thread, Useful Intraday Stats, middle of page 2 for the code.
 

Similar threads

Top