Author: Ran Eliahu | AI Cloud Engineer & Technical Trader
Platform: TD Ameritrade / Schwab ThinkorSwim (TOS)
Language: ThinkScript
Trading Style: Algorithmic scanning, swing trading, momentum day trading, stock picking
This repository is a go-to collection of thinkorswim scanners and custom column formulas designed to improve your scan workflow and watchlist performance.
This repository contains a production-ready collection of ThinkScript stock scanners and technical analysis indicators built for the Schwab ThinkorSwim trading platform. These automated stock screening tools identify high-probability trading opportunities by combining fundamental stock filters, momentum indicators, volatility analysis, and institutional accumulation detection.
Every scanner and study is actively used in live trading workflows with defined edges:
- Day trading scanner: Intraday setups on 5-minute charts (8:30β10:30 AM CT)
- Swing trade finder: Multi-day setups on daily charts (S&P 500 focus)
- Volatility & breakout scanner: TTM Squeeze squeeze-fire detection
- Quality stock screening: Fundamental + technical combination filters
| Feature | Benefit |
|---|---|
| 4 Professional Scanners | Eliminate manual stock screeningβautomate your watchlist |
| ThinkScript Code Examples | Copy-paste ready; production-tested in live trading |
| Momentum & Breakout Detection | TTM Squeeze Pro study + squeeze-fire alerts |
| Fundamental + Technical Combo | Quality stock filters + technical entry signals |
| Institutional Smart Money Signals | Detect accumulation before the big move |
| Mean Reversion Setup Finder | Oversold high-quality stocks near moving averages |
| Day Trading & Swing Trading Ready | Multiple timeframes: 5-min, daily, weekly |
| Full Setup Documentation | Step-by-step import guide included |
- Download the
SETUP_GUIDE.mdand follow the ThinkorSwim import steps - Start with Elite Fundamentals Scanner to build a quality watchlist
- Add TTM Squeeze Pro study to your charts for entry confirmation
- Import all 4 scanners into Stock Hacker
- Run Institutional Accumulation Scanner daily at market close
- Run TTM Squeeze Scanner in "JustFired" mode at 9:45 AM CT for intraday setups
- Pair with your own risk management and position sizing
Watchlist Builder: EliteFundamentals_Scanner.ts
Entry Confirmation: TTMSqueezePro_Study.ts + TTMSqueeze_Scanner.ts
Mean Reversion Plays: FallenAngels_Scanner.ts
Institutional Clues: InstitutionalAccumulation_Scanner.ts
think-or-swim-trading-scanners/
βββ scanners/
β βββ EliteFundamentals_Scanner.ts # Stock screening: P/E, ROE, fundamentals
β βββ FallenAngels_Scanner.ts # Mean reversion: oversold quality stocks
β βββ InstitutionalAccumulation_Scanner.ts # Smart money detection & volume analysis
β βββ TrendReversal_Bullish_Scanner.ts # Bearish to bullish inflection scanner
β βββ TTMSqueeze_Scanner.ts # Volatility scanner: squeeze detection
β βββ VolumeProfile_Breakout_Scan.ts # Volume Profile: Value Area Breakout
β βββ VolumeProfile_Squeeze_Scan.ts # Volume Profile: Value Area Compression
βββ studies/
β βββ TTMSqueezePro_Study.ts # Technical indicator: momentum & breakout
βββ chart_visuals/
β βββ Multi_Timeframe_POC_Study.ts # Volume Profile: Naked POC Magnets
βββ README.md # You are here
βββ SETUP_GUIDE.md # ThinkorSwim import tutorial
βββ custom columns/
β βββ CustomColumn_RSI_Momentum.ts
β βββ CustomColumn_Volume_Surge.ts
β βββ CustomColumn_Trend_Strength.ts
β βββ DistanceToPOC.ts # Volume Profile: Distance to POC %
βββ .git/ # Version control
File: scanners/EliteFundamentals_Scanner.ts
Use Case: Build a curated watchlist for swing trading and position trading
Automatically screens the market for stocks with institutional-grade fundamentals. This stock scanner filters based on profitability, balance sheet strength, and value metrics to identify quality names worthy of technical analysis.
| Filter | Criteria |
|---|---|
| P/E Ratio | 5 β 35 |
| Price/Book Value | < 10 |
| Return on Equity | β₯ 15% |
| Gross Profit Margin | β₯ 40% |
| Current Ratio | β₯ 1.5 |
| Book Value Per Share Growth | > 0 |
| Price | Above 200-day MA |
Best used: Weekly, to maintain a curated watchlist of fundamentally sound stocks for technical entry signals.
File: scanners/FallenAngels_Scanner.ts
Use Case: Identify oversold high-quality stocks near support
A specialized stock screener that finds high-quality S&P 500 names that have pulled back 8β25% from their 52-week highs but are showing early momentum recovery. Perfect for mean-reversion traders buying strength at a discount during market corrections.
Signal Logic:
- RSI(14) between 25β40 (oversold but not broken)
- Price 8β25% below 52-week high
- Price above 200-day MA (long-term trend intact)
- RSI rising (momentum turning up)
Best used: During broad market corrections when VIX > 20. Sort results by RSI ascending for deepest oversold names.
File: scanners/InstitutionalAccumulation_Scanner.ts
Use Case: Detect accumulation before institutional breakouts
A unique stock scanner that identifies where institutional smart money is quietly accumulating before likely breakouts. Uses volume analysis, VWAP positioning, and Money Flow Index patterns to detect the accumulation phase before the big move.
Signal Logic:
- Volume β₯ 1.5Γ the 50-day average
- Price above VWAP
- Within 5% of 52-week high (near breakout)
- Money Flow Index (MFI) > 50
- At least 3 accumulation days in last 10 sessions
- Price above both 50 MA and 200 MA (confirmed uptrend)
Best used: After market close. Stocks appearing consistently across multiple days represent the strongest conviction signals.
File: scanners/TTMSqueeze_Scanner.ts
Use Case: Find breakout-ready stocks and intraday momentum setups
A volatility-focused stock scanner built to complement the TTM Squeeze Pro technical indicator. Three powerful scanning modes for different trading timeframes:
| Mode | Description | Best Run Time |
|---|---|---|
InSqueeze |
Stocks currently coiling (BB inside KC) | Pre-market / after close |
JustFired |
Squeeze fired today | 9:45 AM CT |
BullishFired |
Bullish momentum squeeze only | 10:00β10:30 AM CT |
File: scanners/TrendReversal_Bullish_Scanner.ts
Use Case: Catch the earliest high-probability shift from downtrend to uptrend
A technical scanner that identifies high-probability trend reversal inflection points where an oversold/depressed stock makes a decisive structural shift to the upside. Eliminates false positives by validating prior weakness and synchronizing MACD crossovers with 20 EMA breakouts across a multi-bar window.
Signal Logic:
- Confirms prior bearish pressure (traded below 20 EMA in >= 6 of last 10 bars)
- Price breaks out or holds above 20 EMA with bullish candle structure
- MACD crossover / expansion within 3 bars
- RSI rebounds out of the cold zone (< 42) into bullish recovery (>= 45)
- Institutional volume surge (> 1.15Γ 50-day average volume)
- TTM Squeeze histogram expanding upward
Best used: Daily chart for swing entries; 4-Hour or 60-min for early intraday momentum shifts.
File: scanners/VolumeProfile_Squeeze_Scan.ts
Use Case: Identify stocks compressing within a very tight Value Area before an explosive breakout.
A volatility scanner focused entirely on volume. It calculates the percentage distance between the Value Area High (VAH) and Value Area Low (VAL). When this distance is extremely tight (e.g., < 2% of the stock price), it signals that massive institutional volume has coiled in a narrow band.
Best used: Daily chart for identifying impending swing momentum breakouts before they occur.
File: scanners/VolumeProfile_Breakout_Scan.ts
Use Case: Catch stocks escaping their volume nodes into low-liquidity zones.
Scans for stocks breaking out above their Value Area High (VAH) with strong relative volume (e.g., 25% above 20-day average). When price escapes the Value Area, it tends to move rapidly through low-volume nodes.
Best used: Daily chart for trend continuation and momentum entries.
File: studies/TTMSqueezePro_Study.ts
Use Case: Chart study for breakout and momentum confirmation
A professional-grade technical indicator based on John Carter's famous TTM Squeeze. This momentum study detects volatility compression (Bollinger Bands contracting inside Keltner Channels) followed by explosive momentum breakoutsβperfect for timing breakout entry signals.
Features:
- Dual Keltner Channel detection (standard + wide) for Pro-level squeeze identification
- Color-coded momentum histogram:
- π’ Bright Green β Positive & rising (strongest bull signal)
- π© Dark Green β Positive but fading
- π΄ Bright Red β Negative & falling (strongest bear signal)
- π₯ Dark Red β Negative but recovering
- Squeeze dot indicator (Black = coiling, Red = fired)
- Built-in alerts for bullish and bearish squeeze fires
Timeframes: 5-minute (day trading) | Daily (swing trading)
File: chart_visuals/Multi_Timeframe_POC_Study.ts
Use Case: Chart study to visualize hidden institutional support/resistance levels.
Plots the Point of Control (POC) for the Daily (Cyan), Weekly (Magenta), and Monthly (Yellow) profiles. These heavy volume nodes act as massive "magnets" for price. Institutional algorithms often target these untested (naked) POC levels.
Features:
- Distinct, color-coded lines for Daily, Weekly, and Monthly POCs
- Optional shading for the Value Area (VAH to VAL)
- Easy toggles to hide/show specific timeframes
Timeframes: Intraday (1m, 5m, 15m) or Daily charts
- Open ThinkorSwim β Charts
- Click Studies (beaker icon) β Edit Studies
- Click Create β paste the
.tsfile contents - Name the study and click OK
- Open ThinkorSwim β Scan tab
- Click Stock Hacker
- Click Add Study Filter β Edit
- Paste the scanner
.tscode - Configure filters as described in each file's setup comments
- Set Scan In to desired universe (S&P 500 recommended)
π‘ Pro Tip: All fundamental filters (P/E, ROE, etc.) must be added as separate Fundamental Filters in the Stock Hacker UI β they cannot be set via ThinkScript directly.
These tools are for educational and informational purposes only. Nothing in this repository constitutes financial advice. Trading involves substantial risk of loss. Always do your own research and trade with proper risk management.
- GitHub: github.com/ran-eliahu
- LinkedIn: linkedin.com/in/raneliahu
- Medium: @Eliahu.ran
Built with ThinkScript | Powered by data-driven discipline