1. What is an Intraday Stock Screener?
The NSE (National Stock Exchange) lists over 2,000 stocks. On any given day, only a handful of those will produce a clean, low-risk entry opportunity during market hours. A screener's job is to automatically find those needles in the haystack — before you even have time to look.
An intraday screener specifically looks for buy (or sell) setups that should complete within the same trading session — you enter in the morning and exit by 3:30 PM. Unlike swing or positional trading, there is no overnight risk.
This specific screener focuses on a strategy called momentum breakout: stocks that are moving strongly upward, breaking above their previous day's high, and doing so with unusually high trading volume. The Heikin-Ashi and VWAP tools (explained below) are used to confirm that the move is real and not a false alarm.
2. What Are Heikin-Ashi Candles? (Explained Simply)
On a standard chart, each 5-minute candle shows exactly what happened in those 5 minutes: the opening price, the highest price, the lowest price, and the closing price. The problem is these raw candles are very noisy — one big spike can make a healthy trend look like it reversed, causing traders to exit prematurely.
Heikin-Ashi recalculates each candle using the average of the current and previous bar. The result is a smoother chart where genuine trends are easier to spot. Here is the formula:
# HA Close = average of the current bar's four prices ha_close = (open + high + low + close) / 4 # HA Open = average of the PREVIOUS bar's HA Open and HA Close ha_open[0] = (open[0] + close[0]) / 2 for i in range(1, len(ha_close)): ha_open[i] = (ha_open[i-1] + ha_close[i-1]) / 2 # HA High and Low stay the same as the real bar ha_high = np.maximum.reduce([high, ha_open, ha_close]) ha_low = np.minimum.reduce([low, ha_open, ha_close])
When the HA close is consistently above the HA open over several bars, the stock is in a genuine uptrend — not just reacting to one large trade. This is much more reliable on the 5-minute frame than raw candles.
3. What is VWAP? (And Why Every Intraday Trader Watches It)
VWAP stands for Volume Weighted Average Price. It is the average price at which a stock has traded throughout the day, where trades at higher volume carry more weight.
Large institutions — mutual funds, FIIs, insurance companies — use VWAP as their benchmark. A fund manager will say "I bought HDFC at VWAP today", meaning they got the market's fair price rather than a disadvantageous fill. This makes VWAP a line that every serious market participant watches, which is exactly why it works as a signal level.
This screener uses a rolling 14-bar VWAP (covering the last 70 minutes of trading) rather than the session-cumulative VWAP that resets at 09:15. The rolling version stays sensitive to afternoon momentum shifts, while the cumulative version becomes "anchored" to the morning session as the day progresses. A full comparison of the two appears in Section 13.
# Typical price = average of HA high, HA low, and HA close typical_price = (ha_high + ha_low + ha_close) / 3 # VWAP = sum(price × volume over 14 bars) / sum(volume over 14 bars) vwap = (typical_price * volume).rolling(14).sum() / volume.rolling(14).sum()
4. The Two-Phase Architecture: Why It Works This Way
Naively scanning 500 stocks every 5 minutes would mean downloading 500 × 12 months of data 48 times per trading day — about 24,000 data downloads. Free data providers like yfinance would block the service within hours.
The solution is a two-phase design that keeps API calls to a minimum:
5. Phase 1: The Morning Watchlist Filter
Before the market opens, the screener runs three quick checks on each of the 500 Nifty 500 stocks. All three must pass. About 60–70% of stocks are eliminated here every morning.
One critical implementation detail: the daily bars are always filtered to date < today before computing the 20-day average. This ensures the partial bar of the current session (which has only been open for a few minutes at prewarm time) never contaminates the trend signal.
6. Phase 2: The Five-Gate Signal
During market hours, the screener evaluates the watchlist stocks every 5 minutes. A stock only becomes a pick when all five gates pass simultaneously. A single failing gate is enough to reject the signal.
Think of the gates like a security checkpoint at an airport: you must pass the ID check, the boarding pass check, the bag scan, and the metal detector. Failing one means you don't board, regardless of how you did on the others.
One crucial rule about timing: the screener only evaluates bars that have completely closed. At 11:12 AM, the 11:10–11:15 bar has not yet finished. The screener uses a cutoff:
# At 11:12: cutoff = 11:07. The 11:10 bar is still forming, so it is excluded. cutoff = now - timedelta(minutes=5) intraday_bars = df[ (df.index.date() == today) & (df.index <= cutoff) ]
7. Stop-Loss and Target: Where to Exit
Every trade needs two exit levels before it is placed: a stop-loss (if the trade goes wrong) and a target (if the trade goes right). Without these, you have no idea when to cut your loss or take your profit.
How the stop is calculated
Instead of using an arbitrary percentage, the stop is placed at a meaningful price level. The screener picks the tightest (highest) of three structural levels:
stop = max( row["session_low"] - 0.05, # today's lowest price so far watchlist["prev_low"] - 0.05, # yesterday's lowest price entry - 1.5 * row["atr"] # 1.5× ATR below entry ) # Reject if stop is too far (more than 5% below entry) if (entry - stop) / entry > 0.05: return None # no signal — risk is too high
ATR (Average True Range) measures how much a stock typically moves in a single bar. Using 1.5× ATR keeps the stop just wide enough to avoid normal price noise without being so wide that a loss becomes too large.
8. The NIFTY Market Check (Regime Filter)
Even the best individual stock setup fails when the overall market is crashing. A screener that ignores the index is like booking a beach trip without checking whether a cyclone is approaching.
① NIFTY must be above its 20-day Simple Moving Average (the medium-term trend is up).
② NIFTY must not be more than 0.5% below yesterday's close (the index is not having a bad day).
If either condition fails → zero picks, no database writes. The screener sits out.
The NIFTY data is downloaded once at the start of the session and cached. Without this caching, the check would fire 48 times per day (once per 5-minute tick), generating 48 API calls just for the index — a significant source of rate-limit failures.
Critically, the check is fail-closed: if the NIFTY data download fails for any reason — network error, yfinance outage, server timeout — the function returns False and the scan produces zero picks. Trading in an unknown market environment is worse than not trading at all.
9. The Backtest: 60 Sessions, Honest Results
Before putting any strategy live with real money, FutureGain runs a historical backtest. The rules are strict: entry at the next bar's open (not the signal bar's close), round-trip transaction cost of 0.10% built in, no look-ahead bias, and a random breakout control for comparison.
The comparison is against a random breakout control: a stock from the same universe, at the same time, with the same stop-and-target geometry, but selected randomly rather than by the screener's 5 gates. If the screener adds genuine value, it should beat this control.
| Strategy | Signals | Target Hit Rate | Avg Return / Trade | Result |
|---|---|---|---|---|
HA-VWAP screener 5 gates + NIFTY check | 143 | 14.6% | −0.24% | FAILING |
Random breakout (control) No signal filter applied | 143 | 20.0% | −0.21% | FAILING |
Break-even threshold Required at 2R target, 0.1% cost | — | ~33% | 0.00% | MINIMUM |
The result is unambiguous. At a 2:1 reward-to-risk target, a strategy needs to win roughly 33 out of every 100 trades just to break even after transaction costs. The HA-VWAP screener won only 14.6 out of 100. Even worse: the random control did better (20%), which means the screener's 5 gates are actively making the selection worse, not better.
10. Why Buying Strength Fails on NSE Intraday
This is the most important finding in the article. All five gates select for the same trait: strength. The stock is breaking out. Volume is surging. RSI is elevated. The Heikin-Ashi trend is clearly up. The price is above VWAP.
The problem is that by the time all five of those things are true simultaneously, the stock is at its most crowded and extended point. The traders who were going to buy have already bought. The remaining pool of potential buyers is smaller than the pool of sellers who are now looking to take profit.
This is why the module ships with enabled: false in production configuration. The code is complete, tested, and running in dry-run mode (logging picks without placing orders). Paper-trading it further while testing the alternative strategy (see next section) is the correct next step.
11. What to Build Instead: The VWAP Reclaim Setup
If buying strength is inverted, the correct approach may be the opposite: buying weakness recovering. The "VWAP reclaim" setup enters when a stock that was strong in the morning pulls back to VWAP and then reclaims it — meaning the pullback is over and buyers are back in control.
This setup has not yet been backtested — it is the next hypothesis in the pipeline. The honest position: it is directionally aligned with what the data says NSE intraday favours (mean reversion, not continuation), but until the same rigorous 60-session backtest is run with real fill assumptions, it remains a hypothesis, not a proven signal.
12. Developer Notes: Engineering Decisions Explained
This section is for developers building similar systems. Skip it if you are only interested in the trading logic.
Watchlist rebuild locking
If the morning watchlist build fails (yfinance rate limit, network error), the system must not retry on every subsequent 5-minute tick. The fix is committing _watch_date = today at the very start of the build function — before any download attempt. One try per day. If the morning build succeeds, it stays in memory for the session and survives later transient failures.
Outcome tracking on daily bars (not 5-minute bars)
The outcome tracker resolves intraday picks against daily OHLC, not 5-minute bars. The trade-off is precision for reliability: yfinance retains 5-minute history for only 60 days, while daily history is available indefinitely. The first-day rule compensates: on entry day, the tracker uses the closing price (not the daily high) as the target check, to avoid counting a pre-entry spike as a win.
Causal computation — no look-ahead bias
Every indicator — Heikin-Ashi, rolling VWAP, RSI — is computed so that row t uses only data from bars 0 through t−1. Using future data (even the current bar's final close, if it has not yet formed) would make backtests look better than live performance. The cutoff line above eliminates this class of bug entirely.
13. Session VWAP vs Rolling VWAP — Which Should You Use?
Most NSE screeners — including popular tools on platforms like Stockezee and TradingView — use the session-cumulative VWAP, which resets at 09:15 and accumulates throughout the day. This screener uses a rolling 14-bar VWAP (covering the last 70 minutes). The right choice depends on your strategy and the time of day.
| Property | Session VWAP | Rolling VWAP(14) |
|---|---|---|
| What it shows | Average price for the whole day | Average price for the last 70 min |
| Most informative | 09:15 – 11:00 | Stays informative all day |
| At 14:00 | Mostly anchored to morning volume | Still reacting to recent moves |
| Best for T+1 (buy today, sell tomorrow) | ✓ Best — shows net daily institutional flow | Less useful for overnight signals |
| Best for pure intraday | Good in morning, weakens later | ✓ Best — stays sensitive all session |
| VWAP reclaim setup | ✓ Use session VWAP (09:30–11:00 window) | Use rolling for afternoon setups |
14. Frequently Asked Questions
Conclusion: What This Screener Taught Us
Building this intraday screener was worth it — not because the strategy worked, but because the backtest clearly told us why it did not. Understanding that buying momentum strength on NSE's 5-minute frame is inverted is a valuable piece of market knowledge that shapes how the next strategy will be designed.
The infrastructure — two-phase architecture, causal computation, fail-closed regime filter, structural stops — is solid and will be reused when the VWAP reclaim hypothesis is tested. The module runs in dry-run mode, accumulating paper picks every day, building the live validation sample that will eventually confirm or reject the next idea.
In systematic trading, an honest "this doesn't work" is more valuable than a backfit "this looks great" — because one costs you only time, while the other costs you money.
About the Author
The FutureGain Research Team combines experience in Indian equity markets with quantitative systems. We scan 500+ Nifty 500 stocks daily, process 3,000+ data points per stock, and verify every strategy on live NSE data before publishing. We share what worked and what didn't. Read our methodology →
Disclaimer: FutureGain is not registered with SEBI. All content is educational and research-oriented only. Nothing in this article constitutes investment advice or a recommendation to buy or sell any security. Stock market investments involve substantial risk. Past backtest results do not guarantee future performance. Always consult a SEBI-registered investment advisor before trading.
FutureGain Scans 500+ Nifty Stocks Daily
Skip the code and get production-grade stock signals backed by machine learning. Today's picks across short, medium, and long-term horizons — free, no signup required.
View Today's AI Picks →No credit card. No spam. Educational signals only.