Color Coded Gap Watchlist Columns for ThinkorSwim

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

@tradeking313 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));
 
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.
 
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
 
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.
 
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?
 
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.
 
@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 ?
 
@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.
 
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;
 
@Rodger This code only works as a chart study but not as a column code. I will update it once I figure it out.

@vikram The watchlist columns only work after 9:30. If you want premarket relative volume, then see my thread, Useful Intraday Stats, page 4.
 
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?
 
@CDJay 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.
 
Thanks, @Sonny. So right now, HMHC and HTBK are the two highest RV, but they are below the VWAP. Are you suggesting to wait until they go above the line, then a pullback to the line, before putting in an order with a 5% stop-loss. Or is passing the line from below generally good enough of an indicator?
 
Thanks, @Sonny. So right now, HMHC and HTBK are the two highest RV, but they are below the VWAP. Are you suggesting to wait until they go above the line, then a pullback to the line, before putting in an order with a 5% stop-loss. Or is passing the line from below generally good enough of an indicator?

So it's best to wait until 9:30 for these. Wait for a stock to break VWAP from below and hold as long as it is above VWAP or bounces off it. HTBX did that today but HMHC sloped down after 9:30.
 
Sonny what is the right time or right color to get in by watching rv1 AND C1 ON MY WATCH LIST NO NUMERICAL JUST A WORD NAN
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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