# How to make a screener that screen with intraday criteria?

#### patricktu1258

##### New member
So I am toying with daytrading strategy and have these 2 questions and I think lots of people also encounter these but probably solved.

Let's say, I want to build a scanner that screens stocks which 21EMA(1 min bar) has ever crossed over intraday VWAP.
All the stocks which 21EMA has crossed over intraday VWAP even for just 1 tick, will be included in the scanner.
Is this doable? How to do it?

Another question is how to count the bar since today's session? What I mean is, I want to create a variable that represents 1 at 9:31, 60 at 10:30, 90 at 11:00, 200 at 12:50 and so on.

Much appreciated.

So I am toying with daytrading strategy and have these 2 questions and I think lots of people also encounter these but probably solved.

Let's say, I want to build a scanner that screens stocks which 21EMA(1 min bar) has ever crossed over intraday VWAP.
All the stocks which 21EMA has crossed over intraday VWAP even for just 1 tick, will be included in the scanner.
Is this doable? How to do it?

Another question is how to count the bar since today's session? What I mean is, I want to create a variable that represents 1 at 9:31, 60 at 10:30, 90 at 11:00, 200 at 12:50 and so on.

Much appreciated.

here are 2 ways to create a counting number.

the first (yellow bubbles) displays minutes from the start bar. so if on a 1 minute chart and there are no halts, it will count 0 to 389. but if a different chart time, the numbers will skip.

the second (purple bubbles) method actually counts the bars from the first bar of the day.

Code:
``````# --------------------------------

# minutes from start bar , each day
input start = 0930;

def sec = secondsfromTime(start);
def cnt = (sec/60);

input test1_min = no;
addchartbubble(test1_min and cnt >= 0, low,
cnt
, color.yellow, no);

# --------------------------------

# count bars from start bar , each day
def cnt2 = if sec == 0 then 0
else cnt2[1] + 1;

input test2_cnt = yes;
addchartbubble(test2_cnt and cnt2 >= 0, low,
cnt2
, color.magenta, no);

# --------------------------------``````

87k+ Posts
198 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?