Skip to main content Average True Range Scanner For TOS Skip to main content Skip to content
Master the TTM Squeeze with our comprehensive 19-module course Start Learning →
TOS Indicators
  • Tools

    Categories

    • Indicators
    • Backtesters
    • Scans
    • Dashboards
    • thinkScript
    • Member Resources
    Browse Full Library

    Featured Tutorials

    Heiken Ashi Trend Indicator
    Heiken Ashi Trend Indicator
    Indicators

    Download our Custom Heiken Ashi indicator for ThinkOrSwim. Full ThinkScript code, formula...

    Learn more →
    Commodities Tracker
    Commodities Tracker
    Indicators

    For acceleration signals: trend-following strategies and buying pullbacks. For deceleration signals: short...

    Learn more →
    Build an Election Backtester in 10 Minutes
    Build an Election Backtester in 10 Minutes
    Backtesters

    Learn how to create a Post-Election Backtester in ThinkOrSwim to analyze market...

    Learn more →

    Popular Posts

    Unusual Volume
    Unusual Volume
    Scans

    Build 4 scans to easily find stocks with greater than...

    Learn more →
    Upcoming Earnings with High Short Interest
    Upcoming Earnings with High Short Interest
    Scans

    Build a scan to find stocks that are likely to...

    Learn more →
    Unusual Volume Pro Scans
    Unusual Volume Pro Scans
    Scans

    4 additional scans to find unusual volume overlapping with key...

    Learn more →
  • Courses
    Squeeze Course
    Squeeze Course
    19 Modules

    Scan, backtest, and trade the TTM Squeeze setup with precision.

    Unlock Course →
    Earnings Course
    Earnings Course
    3 Modules

    Master earnings plays with free indicators and proven strategies for ThinkOrSwim.

    Unlock Course →
    V-Shaped Reversals
    V-Shaped Reversals
    7 Modules

    Identify and trade powerful V-shaped reversal patterns with confidence and precision.

    Unlock Course →
    Fibonacci Trading
    Fibonacci Trading
    4 Modules

    Learn to trade Fibonacci retracements and extensions in ThinkOrSwim effectively.

    Unlock Course →
  • Products
    Futures Volatility Box Premium
    Futures Volatility Box

    Volatility models for 10 major futures markets, including micros & SPX.

    Explore Futures VB →
    Stock Volatility Box Premium
    Stock Volatility Box

    Dynamic support & resistance for 595+ stocks/ETFs, with a live scanner.

    Explore Stock VB →
    Opening Range Breakouts Premium
    Opening Range Breakouts

    Powerful live scanner & backtester for ORB strategies on 595+ stocks.

    Explore ORB Setups →
My Account
Back to Tutorials
Beginner 14 minutes ThinkOrSwim

Average True Range Scanner

Master ThinkOrSwim ATR scans to find high-volatility candidates and compression patterns. Combine moving averages with volatility filters for precision trading setups.

Download Scan
How to install in ThinkOrSwim →
Table of Contents
  • Building Average True Range Scanners in ThinkOrSwim
  • High ATR Scanner Implementation
  • ATR Compression Scanner Development
  • Timeframe and Market Condition Optimization
  • Implementation Strategy and Alert Setup
  • Risk Management and Position Sizing
  • Advanced Filtering and Integration
  • Performance Tracking and Continuous Improvement

Master ATR-Based Stock Scanning in ThinkOrSwim

Discover how to build sophisticated Average True Range scanners that automatically identify high-probability trading setups based on volatility patterns and price compression.

In this detailed tutorial, you’ll learn to create 2 essential ATR scanners:

  • High ATR Scanner – Identifies stocks with above-average volatility
  • ATR Compression Scanner – Finds stocks compressing near key moving averages

These scanners help you spot stocks primed for significant moves by analyzing volatility patterns that often precede major price breakouts and momentum shifts.

Building Average True Range Scanners in ThinkOrSwim

Average True Range (ATR) scanners provide a systematic approach to identifying stocks with specific volatility characteristics that often precede significant price movements. By focusing on volatility patterns rather than just price action, you can spot high-probability trading opportunities before they become obvious to other traders.

ATR, developed by J. Welles Wilder Jr., measures market volatility by calculating the average range between high and low prices over a specified period. Unlike directional indicators, ATR focuses purely on the magnitude of price movement, making it valuable for both opportunity identification and risk management.

High ATR Scanner Implementation

The first scanner identifies stocks where current ATR exceeds the 50-day moving average of ATR values. This approach filters for stocks experiencing above-normal volatility, which often correlates with emerging institutional activity and breakout potential.

def ATR = ATR();
def averageATR = Average(ATR, 50);
plot signal = ATR > averageATR;

This scanner identifies stocks experiencing increased institutional activity, breakout candidates with expanding volatility, and opportunities for momentum-based strategies. The logic is straightforward: when current volatility exceeds the recent average, it often signals that something significant is happening with the stock.

For optimal implementation, run this scan during market hours for real-time alerts. Add basic liquidity filters in Stock Hacker: minimum stock price above $10 and average volume above 2 million shares. This ensures you’re working with liquid stocks that won’t gap against you unexpectedly.

The 50-day average provides a good balance between responsiveness and stability. Shorter periods (20-30 days) will give more signals but may include more false positives. Longer periods (100+ days) will be more selective but may miss shorter-term opportunities.

ATR Compression Scanner Development

The compression scanner is more sophisticated, designed to identify stocks in tight trading ranges near key moving averages. This pattern often precedes significant breakouts as volatility contracts before expanding in major moves.

The scanner combines three key technical components that work together to identify high-probability compression patterns:

Range Compression Analysis: Calculate the 10-day high-low range and compare it to current ATR values. When the recent range is tight relative to normal volatility, it suggests accumulation or distribution activity:

def highestHigh = Highest(high, 10);
def lowestLow = Lowest(low, 10);
def range = highestHigh - lowestLow;
def rangeCompression = range <= ATR * 2;

The multiplier of 2 works well for most stocks, but you can adjust based on market conditions. During high volatility periods, increase to 2.5 or 3. During quiet markets, reduce to 1.5 to capture more opportunities.

Moving Average Structure: The scanner requires specific moving average alignment to confirm trend structure. This ensures you're finding compression patterns within established trends rather than directionless consolidation:

def EMA8 = ExpAverage(close, 8);
def EMA34 = ExpAverage(close, 34);
def SMA50 = SimpleMovingAvg(close, 50);
def SMA200 = SimpleMovingAvg(close, 200);
def movingAverageCondition = EMA8 > EMA34 and EMA34 > SMA50 and SMA50 > SMA200;

This moving average hierarchy ensures you're only finding compression patterns in stocks with bullish structure. For bearish setups, reverse the conditions. You can also remove the SMA200 condition if you want a larger universe of stocks.

Proximity to Key Levels: The final component ensures price is trading within a specified percentage of the 50-day simple moving average:

input pct = 0.03;
def pctWithinSMA = close >= (SMA50 * (1 - pct)) and close <= (SMA50 * (1 + pct));

The 3% range works well for most stocks, but you can adjust based on your preferences. Tighter ranges (1-2%) will find stocks very close to the moving average, while wider ranges (4-5%) will capture more opportunities but may be less precise.

Timeframe and Market Condition Optimization

These scanners adapt well to different timeframes and market conditions with proper parameter adjustments.

Timeframe Adaptation: For day trading, apply the scanners to 5-15 minute charts and reduce the ATR period to 10 bars. For swing trading, daily charts work best with the standard 14-period ATR. For position trading, consider weekly charts with 20-period ATR.

Market Condition Adjustments: During high volatility markets (VIX above 25), increase the ATR multiplier in the compression scanner to 2.5 or 3 to avoid false signals. In quiet markets (VIX below 15), reduce the multiplier to 1.5 to capture more opportunities.

Sector Considerations: Technology stocks often require higher ATR thresholds due to their inherent volatility. Utilities and consumer staples may trigger signals with lower multipliers. Consider creating sector-specific scanner versions.

Implementation Strategy and Alert Setup

Effective ATR scanning requires a systematic approach to maximize opportunities while minimizing false signals.

Alert Configuration: Set up real-time alerts by saving your scans in Stock Hacker and enabling "Alert when scan results change." Configure both sound and mobile notifications through the ThinkOrSwim mobile app. This ensures immediate notification when new opportunities emerge during market hours.

Scan Execution Timing: Run the high ATR scanner during market hours for immediate momentum opportunities. Execute the compression scanner after market close to prepare your watchlist for the following day. This approach lets you research potential setups when markets are closed.

Result Filtering: Always verify scanner results with additional analysis. Check for recent news, earnings announcements, and overall chart structure. Volume confirmation is crucial - look for above-average volume to validate the scanner signals.

Risk Management and Position Sizing

ATR values from your scans provide excellent guidance for risk management decisions.

Stop Loss Placement: Use ATR values to set initial stop losses. A common approach is placing stops at 1.5-2x the current ATR below your entry price for long positions. This accounts for normal volatility while providing meaningful protection.

Position Sizing: Higher ATR stocks require smaller position sizes to maintain consistent risk levels. Consider using the formula: Position Size = Risk Amount / (ATR × Stop Loss Multiplier). This automatically adjusts your position size based on the stock's volatility.

Profit Targets: Set initial profit targets at 2-3x the ATR from your entry point. This provides realistic expectations based on the stock's normal movement patterns.

Advanced Filtering and Integration

Volume Confirmation: Add volume filters to ensure adequate liquidity. Minimum average volume of 1-2 million shares helps avoid thin stocks that might gap unexpectedly. Also look for above-average volume on the day stocks appear on your scanner.

Earnings Calendar Integration: Be aware of upcoming earnings announcements, as these can cause volatility spikes unrelated to technical patterns. Consider excluding stocks with earnings within 3-5 days, or create separate scans specifically for earnings plays.

Integration with Other Indicators: Combine ATR scanners with momentum indicators like RSI or MACD for timing entries. Use volume analysis to confirm signals, and check support/resistance levels from the scanner results.

Performance Tracking and Continuous Improvement

Track your scanner performance to optimize parameters and improve results over time.

Hit Rate Analysis: Monitor how often scanner results lead to profitable trades. Track this data by scanner type, market condition, and timeframe to identify the most effective applications.

Parameter Testing: Test different ATR multipliers, timeframes, and additional filters. Keep detailed records of parameter changes and their impact on results. What works in trending markets may not work in range-bound conditions.

False Signal Reduction: Identify common characteristics of false signals and add filters to reduce them. This might include minimum volume requirements, price action confirmations, or additional technical indicators.

Successful ATR scanning requires patience and discipline. These scanners identify potential opportunities, not guaranteed profits. Always combine scanner results with proper risk management, market context analysis, and confirmation techniques. Start with the basic high ATR scanner to understand volatility-based opportunity identification, then gradually incorporate the more sophisticated compression scanner as you gain experience.

(2) ATR Scans.ts
# Average True Range Scanners for ThinkOrSwim

# Generated by TOS Indicators

# Full tutorial: tosindicators.com/scans/average-true-range

# Scanner 1: High ATR Detection

# Identifies stocks with ATR above 50-day average


// ... 33 more lines ...

Unlock This Code

Create a free account to access the full source code and download files.

Create Free Account Login
To scan for stocks with ATR between specific values (e.g., 0.50 to 2.00), use: def atrValue = ATR(); plot signal = atrValue >= 0.50 and atrValue <= 2.00; This finds stocks within your desired volatility range. You can adjust the values based on your trading style - day traders often prefer ATR above 0.50, while swing traders may want ATR between 1.00-5.00.
ThinkOrSwim scanners only work on the timeframe you select in the scan aggregation period - they don't support custom-timeframe scanning. You are limited to running the scan on the built-in aggregation periods that ThinkOrSwim provides (ie. you cannot run a custom 39-minute ATR scan).
Use this code to find stocks with ATR above a specific value: def atrValue = ATR(); plot signal = atrValue >= 1.0; Replace 1.0 with your minimum ATR requirement. Many traders prefer stocks with at least $0.50 ATR for day trading or $1.00+ ATR for swing trading to ensure adequate movement potential.
Common issues include: missing plot statement (always include "plot signal = condition;"), incorrect syntax, or too restrictive filters. Start with basic liquidity filters (price > $10, volume > 1M) and a simple ATR condition. If still getting errors, check for typos and ensure you're using ThinkScript Editor, not Condition Wizard for custom ATR code.
Pre-market ATR scanning is challenging because there's limited data and gaps in price action. Use extended hours data and consider using the previous day's ATR for filtering: def atrValue = ATR(); plot signal = atrValue > Average(ATR(), 20); This compares current ATR to the 20-day average, which works better with sparse pre-market data.
ATR() gives you the smoothed average true range over a period (default 14), while TrueRange() gives the raw true range for individual bars. For scanning, use ATR() for general volatility filtering: plot signal = ATR() > 1.0; Use TrueRange() for specific bar patterns: plot signal = TrueRange(high, close, low) > ATR() * 2.0;
Use this code to find stocks with today's range greater than ATR: def todayRange = high - low; def atrValue = ATR(); plot signal = todayRange > atrValue; This identifies stocks experiencing above-average daily movement, useful for finding momentum plays or breakout candidates.
Yes, ThinkOrSwim includes ATRHighSMABreakoutsFilter in Stock Hacker under Study filters. It's designed for stocks priced $15-$70 with minimum $5 range over 90 days and 1M+ volume. However, custom ATR scans offer more flexibility and can be used on any timeframe, while the built-in filter only works on daily charts.

Here are some resources that you may find useful:

  • How to import an indicator into ThinkOrSwim (video tutorial)
Featured Tools:
Stock Volatility Box

Stock Volatility Box

Spot reversal zones across 600 stocks & ETFs.

  • Hourly & daily models
  • Powerful Live Scanner
  • Built for day traders
Futures Volatility Box

Futures Volatility Box

Pinpoint reversal zones in 10 major futures markets.

  • 5 models (incl. Scalper)
  • ThinkOrSwim & TradingView
  • SPX traders
ORB Setups

ORB Setups

Find the best Opening Range Breakout setups.

  • Powerful real-time scanner
  • Instant backtests
  • 2+ years data

Get Free Access

Create a free account for downloads and new tutorial alerts.

Create Free Account

More Tutorials Like This

DMI Power Move Scans

DMI Power Move Scans

Beginner • 24 minutes
Unusual Volume Pro Scans

Unusual Volume Pro Scans

Beginner • 31 minutes
Fisher Transformer

Fisher Transformer

Advanced • 14 minutes

Ready to Trade With an Edge?

Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.

Get the Bundle
TOS Indicators

Premium thinkorswim indicators, scans, and trading tools to help you trade smarter.

ThinkOrSwim Tools

  • Indicators
  • Scans
  • Backtesters
  • Dashboards
  • thinkScript
  • Browse All

Courses

  • Squeeze Course
  • Earnings Course
  • V-Shaped Reversals
  • Fibonacci Trading

Products

  • Futures Volatility Box
  • Stock Volatility Box
  • ORB Setups
  • Shop All

Guides

  • TTM Squeeze
  • Automated Trading
  • Volatility Trading
  • Opening Range Breakouts
  • Trade Reports
  • Contact Us

© 2026 TOS Indicators. All rights reserved.

Privacy Policy Terms of Service Disclaimer

The information contained on this website is solely for educational purposes, and does not constitute investment advice. The risk of trading in securities markets can be substantial. You must review and agree to our Terms of Service prior to using this site.

U.S. Government Required Disclaimer - Commodity Futures Trading Commission. Futures and options trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This website is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this website. The past performance of any trading system or methodology is not necessarily indicative of future results.

Individual results may vary, and testimonials are not claimed to represent typical results. All testimonials are by real people, and may not reflect the typical purchaser's experience, and are not intended to represent or guarantee that anyone will achieve the same or similar results.

TOS Indicator's Traders and employees will NEVER manage or offer to manage a customer or individual's options, stocks, currencies, futures, or any financial markets or securities account. If someone claiming to represent or be associated with TOS Indicator solicits you for money or offers to manage your trading account, do not provide any personal information and contact us immediately.

CFTC RULE 4.41 - HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY, SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.