Market Screener
A free Google Sheets screener for US and India stocks, commodities, and crypto. It runs on Google's servers every morning and emails you the signals.
What it does
- Watchlists in a Google Sheet. One tab each for US Stocks, India Stocks, Commodities (gold, silver, oil), and Crypto. Add or remove assets by editing rows. Untick a checkbox to pause one.
- Signals. Breaches and crosses of the 20, 50, and 200-day averages, golden and death crosses, Darvas box breakouts, RSI extremes, and volume spikes.
- Results in the same sheet. A Results tab with every asset, an Alerts tab with only the flagged ones, and a Log tab for errors.
- Daily email digest at 7am IST, after the Indian close and the previous US close.
Signals
| Signal | Meaning |
|---|---|
| BUY: crossed above 20/50/200DMA | Price moved from below an average to above it since the previous close. |
| SELL: crossed below 20/50/200DMA | Price moved from above an average to below it. |
| BUY: golden cross / SELL: death cross | The shorter average crosses the longer one (20/50 or 50/200). |
| BUY: broke above Darvas box top / SELL: broke below Darvas box bottom | The close moves beyond the edge of the most recent Darvas box. |
| Oversold / Overbought | RSI(14) below 30 or above 70. |
| Volume spike | Today's volume is at least 2x the 20-day average. |
| Trend | "Bullish stack" when price > 20 > 50 > 200-day average, "Bearish stack" for the reverse, otherwise "Mixed". Shown on Results, not alerted on. |
Get started
1. Download the code
Either download the ZIP and unzip it, or clone the repo:
git clone https://github.com/rahuling/market-screener.git
You only need Code.gs and appsscript.json. The rest of the repo is documentation.
2. Create the Apps Script project
- Go to script.google.com and click New project.
- Replace the contents of
Code.gswith the file from the repo. - Open Project Settings (gear icon), tick Show "appsscript.json" manifest file in editor, then go back to the editor. Replace the contents of
appsscript.jsonwith the file from the repo. - Save with Ctrl+S (Cmd+S on a Mac) and rename the project to Market Screener.
3. Run it once
- In the function dropdown at the top, choose
runScreenerand click Run. - Approve the permissions when asked. Google will show an "unverified app" warning because the script is your own. Click Advanced, then continue.
- The run creates a spreadsheet called Market Screener in your Drive, with the four watchlist tabs, and emails you a digest.
4. Schedule the daily run
Choose setupDailyTrigger from the dropdown and click Run once. It schedules runScreener every day at 7am.
5. Edit your watchlist
Open the spreadsheet and edit the input tabs:
- Add: type a symbol and name in a new row, then tick Enabled.
- Pause: untick Enabled.
- Remove: delete the row.
| Tab | Symbol format | Example |
|---|---|---|
| US Stocks | Ticker | AAPL |
| India Stocks | NSE ticker with .NS (or .BO for BSE) | TCS.NS |
| Commodities | Yahoo Finance futures symbol | GC=F gold, SI=F silver, CL=F WTI oil |
| Crypto | CoinGecko id (lowercase name in the coin's URL) | bitcoin, avalanche-2 |
The next run picks up your changes. Nothing else needs to be edited.
Notes
- Yahoo Finance and CoinGecko are free and unofficial. They can change or rate-limit requests. Check the Log tab if a run has errors.
- Crypto uses daily closes only, so the Darvas box for crypto is approximate.
- Assets need at least 201 days of history to compute the 200-day average. Newer listings are skipped and logged.
- This is a screening tool for research and learning, not investment advice.