high / low count script

TRex50

New member
Hi, I'm a user of Street Smart Edge at Schwab and the system is going away so Think or Swim will be my new trading system. Schwab has a high/low count screener that shows all the active stocks making new highs or lows during the day. The higher the count, the more momentum a stock has. I don't see a similar screener on TOS. Does anyone have a script for the high/low count that they are willing to share? Or does anyone have a high/low count scanner available?

Thank you so much.
 
Solution
Hi, I'm a user of Street Smart Edge at Schwab and the system is going away so Think or Swim will be my new trading system. Schwab has a high/low count screener that shows all the active stocks making new highs or lows during the day. The higher the count, the more momentum a stock has. I don't see a similar screener on TOS. Does anyone have a script for the high/low count that they are willing to share? Or does anyone have a high/low count scanner available?

Thank you so much.


watchlist column study

during the current day, this counts how many bars make new highs and counts new lows.
it determines which count is bigger and shows that number first and the other second. the low count is shown as a negagive number.
if the...
Hi, I'm a user of Street Smart Edge at Schwab and the system is going away so Think or Swim will be my new trading system. Schwab has a high/low count screener that shows all the active stocks making new highs or lows during the day. The higher the count, the more momentum a stock has. I don't see a similar screener on TOS. Does anyone have a script for the high/low count that they are willing to share? Or does anyone have a high/low count scanner available?

Thank you so much.


watchlist column study

during the current day, this counts how many bars make new highs and counts new lows.
it determines which count is bigger and shows that number first and the other second. the low count is shown as a negagive number.
if the highs have a bigger number, then the cell is green. if lows have a bigger count then red.


zhilo_cnts
http://tos.mx/!wqkNhgKy


Code:
# zhilo_cnts
# day_hilo_cnts


#https://usethinkscript.com/threads/tos-high-low-count-script.17960/

#declare lower;

def na = Double.NaN;
def bn = BarNumber();
def en = !isnan(close);

def d = GetDay();
def newday = d != d[1];
def lastday = d == getlastday();
input only_last_day = yes;

def hi = if bn == 1 then 0 else if newday then high else Max(hi[1], high);
def lo = if bn == 1 then 0 else if newday then low else Min(lo[1], low);

def hidaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if hi > hi[1] then hidaycnt[1] + 1
 else hidaycnt[1];
plot z1 = hidaycnt;

def lodaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if lo < lo[1] then lodaycnt[1] + 1
 else lodaycnt[1];
plot zlo = -lodaycnt;

def bigger = if (hidaycnt - lodaycnt) >= 0 then hidaycnt else -lodaycnt;
def smaller = if (hidaycnt - lodaycnt) >= 0 then -lodaycnt else hidaycnt;


#input min_number = 5;
#plot scan = if absvalue(bigger) >= min_number then 1 else 0;

#addlabel(1, "hi " + hidaycnt, color.green);
#addlabel(1, "lo " + (lodaycnt), color.red);
#addlabel(1, "b " + bigger, color.gray);
##addlabel(1, (hidaycnt - lodaycnt), color.magenta);

addlabel(1, 
(if bigger < 0 then "-" else "") + (if bigger < 10 and bigger > -10 then "0" else "") + absvalue(bigger) +
 " / " + 
(if smaller < 0 then "-" else "") + (if smaller < 10 and smaller > -10 then "0" else "") + absvalue(smaller)
, color.black);

assignbackgroundcolor(if bigger > 0 then color.green else if bigger < 0 then color.red else color.gray);
#



-------------------

test code - lower study
draws 2 lines, for the counts each day.
labels show counts for current day.


Code:
# day_hilo_cnts

#https://usethinkscript.com/threads/tos-high-low-count-script.17960/
declare lower;

def na = Double.NaN;
def bn = BarNumber();
def en = !isnan(close);

def d = GetDay();
def newday = d != d[1];
def lastday = d == getlastday();
input only_last_day = yes;

def hi = if bn == 1 then 0 else if newday then high else Max(hi[1], high);
def lo = if bn == 1 then 0 else if newday then low else Min(lo[1], low);

def hidaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if hi > hi[1] then hidaycnt[1] + 1
 else hidaycnt[1];
plot z1 = hidaycnt;

def lodaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if lo < lo[1] then lodaycnt[1] + 1
 else lodaycnt[1];
plot zlo = -lodaycnt;

def bigger = if (hidaycnt - lodaycnt) >= 0 then hidaycnt else -lodaycnt;
def smaller = if (hidaycnt - lodaycnt) >= 0 then -lodaycnt else hidaycnt;


#input min_number = 5;
#plot scan = if absvalue(bigger) >= min_number then 1 else 0;

addlabel(1, " ", color.black);
addlabel(1, "hi " + hidaycnt, color.green);
addlabel(1, " ", color.black);
addlabel(1, "lo " + (lodaycnt), color.red);
#addlabel(1, "b " + bigger, color.gray);
#addlabel(1, (hidaycnt - lodaycnt), color.magenta);
#addlabel(1, bigger + " / " + smaller, color.gray);
addlabel(1, " ", color.black);

addlabel(1, 
(if bigger < 0 then "-" else "") + (if bigger < 10 and bigger > -10 then "0" else "") + absvalue(bigger) +
 " / " + 
(if smaller < 0 then "-" else "") + (if smaller < 10 and smaller > -10 then "0" else "") + absvalue(smaller)
#, color.gray);
, (if bigger > 0 then color.green else if bigger < 0 then color.red else color.gray));

#assignbackgroundcolor(if bigger > 0 then color.green else if bigger < 0 then color.magenta else color.gray);
#
 

Attachments

  • 00c-img2-col.JPG
    00c-img2-col.JPG
    49.5 KB · Views: 94
  • 00c-img3-lower.JPG
    00c-img3-lower.JPG
    113.6 KB · Views: 91
Solution
watchlist column study

during the current day, this counts how many bars make new highs and counts new lows.
it determines which count is bigger and shows that number first and the other second. the low count is shown as a negagive number.
if the highs have a bigger number, then the cell is green. if lows have a bigger count then red.


zhilo_cnts
http://tos.mx/!wqkNhgKy


Code:
# zhilo_cnts
# day_hilo_cnts


#https://usethinkscript.com/threads/tos-high-low-count-script.17960/

#declare lower;

def na = Double.NaN;
def bn = BarNumber();
def en = !isnan(close);

def d = GetDay();
def newday = d != d[1];
def lastday = d == getlastday();
input only_last_day = yes;

def hi = if bn == 1 then 0 else if newday then high else Max(hi[1], high);
def lo = if bn == 1 then 0 else if newday then low else Min(lo[1], low);

def hidaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if hi > hi[1] then hidaycnt[1] + 1
 else hidaycnt[1];
plot z1 = hidaycnt;

def lodaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if lo < lo[1] then lodaycnt[1] + 1
 else lodaycnt[1];
plot zlo = -lodaycnt;

def bigger = if (hidaycnt - lodaycnt) >= 0 then hidaycnt else -lodaycnt;
def smaller = if (hidaycnt - lodaycnt) >= 0 then -lodaycnt else hidaycnt;


#input min_number = 5;
#plot scan = if absvalue(bigger) >= min_number then 1 else 0;

#addlabel(1, "hi " + hidaycnt, color.green);
#addlabel(1, "lo " + (lodaycnt), color.red);
#addlabel(1, "b " + bigger, color.gray);
##addlabel(1, (hidaycnt - lodaycnt), color.magenta);

addlabel(1,
(if bigger < 0 then "-" else "") + (if bigger < 10 and bigger > -10 then "0" else "") + absvalue(bigger) +
 " / " +
(if smaller < 0 then "-" else "") + (if smaller < 10 and smaller > -10 then "0" else "") + absvalue(smaller)
, color.black);

assignbackgroundcolor(if bigger > 0 then color.green else if bigger < 0 then color.red else color.gray);
#



-------------------

test code - lower study
draws 2 lines, for the counts each day.
labels show counts for current day.


Code:
# day_hilo_cnts

#https://usethinkscript.com/threads/tos-high-low-count-script.17960/
declare lower;

def na = Double.NaN;
def bn = BarNumber();
def en = !isnan(close);

def d = GetDay();
def newday = d != d[1];
def lastday = d == getlastday();
input only_last_day = yes;

def hi = if bn == 1 then 0 else if newday then high else Max(hi[1], high);
def lo = if bn == 1 then 0 else if newday then low else Min(lo[1], low);

def hidaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if hi > hi[1] then hidaycnt[1] + 1
 else hidaycnt[1];
plot z1 = hidaycnt;

def lodaycnt = if bn == 1 then 0
 else if only_last_day and d != getlastday() then 0
 else if en and newday then 0
 else if lo < lo[1] then lodaycnt[1] + 1
 else lodaycnt[1];
plot zlo = -lodaycnt;

def bigger = if (hidaycnt - lodaycnt) >= 0 then hidaycnt else -lodaycnt;
def smaller = if (hidaycnt - lodaycnt) >= 0 then -lodaycnt else hidaycnt;


#input min_number = 5;
#plot scan = if absvalue(bigger) >= min_number then 1 else 0;

addlabel(1, " ", color.black);
addlabel(1, "hi " + hidaycnt, color.green);
addlabel(1, " ", color.black);
addlabel(1, "lo " + (lodaycnt), color.red);
#addlabel(1, "b " + bigger, color.gray);
#addlabel(1, (hidaycnt - lodaycnt), color.magenta);
#addlabel(1, bigger + " / " + smaller, color.gray);
addlabel(1, " ", color.black);

addlabel(1,
(if bigger < 0 then "-" else "") + (if bigger < 10 and bigger > -10 then "0" else "") + absvalue(bigger) +
 " / " +
(if smaller < 0 then "-" else "") + (if smaller < 10 and smaller > -10 then "0" else "") + absvalue(smaller)
#, color.gray);
, (if bigger > 0 then color.green else if bigger < 0 then color.red else color.gray));

#assignbackgroundcolor(if bigger > 0 then color.green else if bigger < 0 then color.magenta else color.gray);
#

Thank you for the response back. Schwab's high/low count is based on trades not candles but I will see if I can make this indicator work. Thanks again.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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