# of Traders

Alex17

New member
Does anyone have a script that can show the number of traders the stock has on the day? For example, when it's 11:30 am, I want to see the number of trades it's traded so far on the day like I see the volume.
 
@Alex17 Unfortunately, Thinkorswim doesn't provide us a means of extrapolating Time and Sales data via Thinkscript which is what you would need access to in order to fulfill your request... So the short answer is No... Further, even Time and Sales data wouldn't narrow trades down to individual trader... The only time that data becomes available is when very large institutional traders or corporate officers trade in large blocks, but Thinkorswim doesn't provide that either, it must be reported to the SEC if I'm not mistaken... Never paid much attention to that data myself...
 
Last edited:

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

@Alex17 Unfortunately, Thinkorswim doesn't provide us a means of extrapolating Time and Sales data via Thinkscript which is what you would need access to in order to fulfill your request... So the short answer is No... Further, even Time and Sales data wouldn't narrow trades down to individual trader... The only time that data becomes available is when very large institutional traders or corporate officers trade in large blocks, but Thinkorswim doesn't provide that either, it must be reported to the SEC if I'm not mistaken... Never paid much attention to that data myself...
Thanks for the information, but I don’t think number of traders has anything to do with Time and Sales. I‘be just seen people have that indicator on their chart, so I thought you might know. Anyways still thank you.
 
Thanks for the information, but I don’t think number of traders has anything to do with Time and Sales. I‘be just seen people have that indicator on their chart, so I thought you might know. Anyways still thank you.
Correct, the two are not related... My point was that we have no way of knowing how many "traders" have traded a security... That data is never collected to the best of my knowledge, not even at the brokerage level, as data we might be privy to...
 
I‘be just seen people have that indicator on their chart.
@Alex17 Maybe we are not talking about the same thing. I agree w/ @rad14733, to my knowledge the number of traders trading a security is not compiled for many (some legal) reasons and if it is be collected somewhere, pretty sure it wouldn't be shared publicly.

Could you share a screenshot from one of the people who have that indicator on their chart and perhaps we can figure out what it is a measurement of? You have piqued my interest.
https://usethinkscript.com/threads/how-to-insert-image-in-a-post-thread.277/

Ahhhh... I see now... You are the poster who also asked about hover feature on the volume indicator when told no, you had the exact same answer: "I seen people who have it"

I get that you have seen something. But unfortunately the terms you are using to describe what you have seen does not line up with what is possible. As they say, a picture is worth a 1000 words. Someone maybe able to come up with an answer for what you have seen if you provide snapshots and links to the charts you are describing.
 
Last edited:
@Alex17 Maybe we are not talking about the same thing. I agree w/ @rad14733, to my knowledge the number of traders trading a security is not compiled for many (some legal) reasons and if it is be collected somewhere, pretty sure it wouldn't be shared publicly.

Could you share a screenshot from one of the people who have that indicator on their chart and perhaps we can figure out what it is a measurement of? You have piqued my interest.
https://usethinkscript.com/threads/how-to-insert-image-in-a-post-thread.277/

Ahhhh... I see now... You are the poster who also asked about hover feature on the volume indicator when told no, you had the exact same answer: "I seen people who have it"

I get that you have seen something. But unfortunately the terms you are using to describe what you have seen does not line up with what is possible. As they say, a picture is worth a 1000 words. Someone maybe able to come up with an answer for what you have seen if you provide snapshots and links to the charts you are describing.
9EVElC0.png
 

Based upon the above chart, the 'Trades Pre_Breakout' are determined by use of the function 'tick_count'.
TOS defines 'tick_count() as : Returns the number of trades corresponding to an intraday bar.
I have made some code to show how this is determined in your posted chart.
Upper chart code
Code:
input timezone = {default "ET", "CT", "MT", "PT"};

def starthour  = (if timezone == timezone."ET"
                        then 9
                        else if timezone == timezone."CT"
                        then 8
                        else if timezone == timezone."MT"
                        then 7
                        else 6) ;
def hour = Floor(((starthour * 60 + 30) + (GetTime() - RegularTradingStart(GetYYYYMMDD())) / 60000) / 60);
def minutes = (GetTime() - RegularTradingStart(GetYYYYMMDD())) / 60000 - ((hour - starthour) * 60 + 30) + 60;

#Highest High during RTH
def hi         = CompoundValue(1, if GetTime() crosses above RegularTradingStart(GetYYYYMMDD())
                                       then high
                                       else if high > hi[1]
                                       then high
                                       else hi[1]
                                  , hi[1]);
def hbar       = if GetDay() == GetLastDay()
                 then if high == hi
                      then BarNumber()
                      else hbar[1]
                 else 0;

def phbar      = if hbar != hbar[1] then hbar[1] else phbar[1];
def phigh      = HighestAll(if BarNumber() == HighestAll(phbar) then high else Double.NaN);

def cond       = if high crosses above phigh then high else double.nan;
plot hdcross   = if high == highestall(cond) then high else double.nan;
hdcross.setpaintingStrategy(paintingStrategy.BOOLEAN_ARROW_DOWN);

def hihr    = if high crosses above phigh then hour    else hihr[1];
def himin   = if high crosses above phigh then minutes else himin[1];
AddLabel(1, "Breakout Time "
            + (hihr + ":") +
           (if himin < 10
            then "0" + himin
            else  "" + himin ) , Color.WHITE);

def trades      = if GetDay() != GetLastDay() then 0 else tick_count() + trades[1];
def trades_cond = if high crosses above phigh then trades[1] else Double.NaN;
AddLabel(1, "#Trades Pre_Breakout " + HighestAll(trades_cond), color.yellow);
Lower Chart code
Code:
def Data = if GetDay() != GetDay()[1] then 0 else Data[1] + tick_count();
plot trades = Data;
 
Last edited:
@SleepyZ already answered this question. She proved that "based upon the above chart, the 'Trades Pre_Breakout' are determined by use of the function 'tick_count'. TOS defines 'tick_count() as : Returns the number of trades corresponding to an intraday bar.

I am still in awe that was figured that out so fast.
 
I think we still need some clarification from @Alex17 regarding whether he wants to know "trades" or "traders"... Yes, tick_count() does return the number or "trades" per candle/bar but does not determine the number of "traders" because retail "traders" and/or institutional "traders" might make multiple block "trades" within a single candle/bar and throughout the trading session, thus skewing the count of "traders"... Hence, while we can get a sum of total "trades" we cannot get a sum of total "traders"... Without hearing back from @Alex17 we're left speculating and perhaps needlessly expending our time and energy here...
 
Based upon the above chart, the 'Trades Pre_Breakout' are determined by use of the function 'tick_count'.
TOS defines 'tick_count() as : Returns the number of trades corresponding to an intraday bar.
I have made some code to show how this is determined in your posted chart.
Hey! sorry to bother, but Im trying to set up a scan that allows me to see the stocks that had more than 3000 trades on a day. I tried using the tick_count function but its not working. Could you help me?
 
Hey! sorry to bother, but Im trying to set up a scan that allows me to see the stocks that had more than 3000 trades on a day. I tried using the tick_count function but its not working. Could you help me?
Tick_count only works on intraday aggregations. Try using what worked for me on a four hour aggregation: tick_count() > 3000
 
@SleepyZ - Thank you for sharing!

I added the following code to a watchlist column to enable sorting based off 'trade' count; results yielded 0.0 or NaN -

def Data = if GetDay() != GetDay()[1] then 0 else Data[1] + tick_count();
plot trades = Data;

Hoping it isn't a platform limitation and someone knows of a solution.


*EDIT - Google search result...

Code:
# Total Trades Scan
# Mobius
# V01

def RTHo = getTime() crosses above RegularTradingStart(getYYYYMMDD());
def Ticks = if RTHo
then Tick_Count()
else Ticks[1] + Tick_Count();

plot ScanCond = Ticks > 500; # Adjust this value for whatever comparison you want

Code:
# Total Trades Label for WatchList Column or Chart Study
# Mobius
# V01

def RTHo = getTime() crosses above RegularTradingStart(getYYYYMMDD());
def Ticks = if RTHo
then Tick_Count()
else Ticks[1] + Tick_Count();

AddLabel(1, "Total Trades = " + Ticks, color.white);
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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