OPEN-SOURCE SCRIPT
Updated

2nd Day Stock Scanner

276
2ND DAY STOCK SCANNER

A Pine Screener-ready indicator that flags stocks having an "in play" session — the kind of session that sets up a classic 2nd Day Play. Run it across a watchlist or the broader market to build a daily list of names worth watching for continuation the next session.


THE 2ND DAY PLAY CONCEPT

A stock becomes "in play" when a catalyst — earnings, guidance, an FDA decision, an upgrade/downgrade, a contract win, a short squeeze, breaking news — pulls in enough participants that the stock trades with unusual size and unusual range for a full session. That session (Day 1) prints levels — the high and the low — that carry real weight, because so many market participants transacted around them.

On the next session (Day 2), those Day 1 levels often become the reference points for continuation: a break above Day 1's high can trigger fresh buying from traders who missed the move or are adding to winners; a break below Day 1's low can do the same on the short side. This is the "2nd Day Play" — trading the follow-through, using yesterday's range as the map.

This indicator's job is to find Day 1: the session that qualifies as genuinely "in play," so you know which names to build a Day 2 plan around.


WHAT IT FLAGS

A session qualifies as a match when ALL of the following are true on that bar (daily timeframe):

1. Outsized move — the close is up or down at least a configurable % (default 3%) versus the prior day's close.

2. Strong directional close — the close falls within the top or bottom 20% (configurable) of the day's own high-low range. An up day closing near its high, or a down day closing near its low, signals conviction rather than a fade.

3. Elevated relative volume (RVOL) — volume exceeds a configurable % of the average volume over the prior N days (default: 100% of a 50-day average, i.e. above-normal turnover).

4. Volatility expansion — the day's true range exceeds the recent Average True Range (default 14-period), meaning the stock moved more than its own normal volatility would suggest.

By default the script also requires the move direction, close location, and volume/volatility expansion to all point the same way (an up move that closes strong = bullish match; a down move that closes weak = bearish match). This directional-alignment requirement can be turned off in settings if you want looser matching.


READING THE OUTPUT

- Scan Match (0/1): the combined signal; this is the one to filter on for a general watchlist.
- Bullish Match / Bearish Match (0/1): directional versions, useful for building separate long and short watchlists.
- Pct Change, Range Position %, RVOL %, Range minus ATR: the underlying metrics, useful for sorting and sanity-checking why a name matched.
- On a chart: a green/red background tint, a triangle marker, and a small "2D up / 2D down" label mark matching sessions; an info table in the corner shows live values for the current bar.
- Alerts: "Bullish 2nd Day Scan," "Bearish 2nd Day Scan," and "Any 2nd Day Scan Match" fire on chart instances of the script (Pine Screener itself does not push alerts — see setup notes below).


SETTINGS

- Min |% change| — default 3% — minimum move vs. prior close
- Top/Bottom % of range — default 20% — how close to the high/low the close must be
- Min RVOL % — default 100% — volume vs. average volume threshold
- Avg volume lookback — default 50 bars — window for the volume average
- ATR length — default 14 — window for the volatility baseline
- Require direction match — default on — whether move direction must match close location


WHEN IT'S MOST VALUABLE

This indicator is a filter, not a trade signal. It's most useful run at or after the close (or scanned intraday for names already meeting the criteria in real time) to surface candidates that just had a genuine catalyst day — the kind of session worth carrying onto tomorrow's watchlist. It's less useful, and can produce false positives, on thinly traded or low-priced names where volume and range statistics are naturally erratic, or around known binary events (earnings, FDA dates) where a gap can satisfy the range/volume criteria without real intraday conviction. Always confirm a match against the news/catalyst driving the move, and build your own Day 2 execution plan (breakout, pullback, opening-range tactics) around the flagged levels — the scanner finds the candidates, it doesn't time the entry.


SETTING UP THE PINE SCREENER

1. In TradingView, open Pine Screener (left toolbar, or Products > Screeners > Pine Screener).

2. Pick your universe from the Watchlist dropdown — a saved watchlist, or one of TradingView's broader market lists.

3. Load this script from the script-select dropdown next to the watchlist selector.

4. Click the script's name/settings icon to open its Settings dialog inside the Screener. This is a separate instance from any chart — inputs you change on a chart do not carry over, and vice versa. Set your thresholds here and click Apply.

5. Use the + button to add the columns you want visible: Scan Match, Bullish Match, Bearish Match, Pct Change, Range Position %, RVOL %, Range minus ATR.

6. Click on the Scan Match column pill and set a filter, e.g. "Greater than 0.5" (since the output is 0 or 1, this isolates matches). Use Bullish Match / Bearish Match instead if you want a directional-only list.

7. Click Scan. Sort by any column to review results, and use the unfiltered metric columns to see why each name matched.

8. For live, per-symbol alerts during the session, add the script to that symbol's chart individually and create an alert from one of its three alert conditions — the Screener is a point-in-time scan, not a persistent alert engine.


DISCLAIMER

For informational and educational purposes only — not financial advice. This scanner identifies stocks meeting a set of historical price/volume conditions; it does not predict future performance. Always do your own research and manage your own risk.
Release Notes
Added Bullish Match and Bearish Match as numeric outputs so directional setups (long-only / short-only) can be filtered directly in Pine Screener — previously only visible as chart markers, not screener-filterable.

Added a solid background to the on-chart info table so it stays readable on any chart theme, instead of relying on the underlying chart background showing through.

Added a short description column to the on-chart info table, explaining what each row (% Change, Range Pos, RVOL, Range vs ATR, Direction) means at a glance.
Release Notes
Added an Info table position setting (Top/Middle/Bottom × Left/Center/Right — 9 options) so the on-chart table can be moved anywhere, instead of being fixed to the top right.
Added an Info table text size setting (Tiny, Small, Normal, Large) to control how large the table displays.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.