LogoLogo
Return to StockChartsCharts & ToolsArticlesChartSchoolYour Dashboard
  • Support Center
  • Finding Your Way Around
    • Intro to StockCharts
    • Navigating the Website
    • Logging In for the First Time
    • Members Dashboard
  • data and ticker symbols
    • Data Availability
      • Markets We Cover
      • Real-Time Data
        • BATS Real-Time Data
      • Extended Hours Data
      • Data Bar Periods
      • Price Data Adjustments
      • Historical Data
        • How Do I Download Data to Excel?
        • StockCharts Historical Sector Data
    • Ticker Symbols
      • Ticker Symbol Conventions
      • How to Find a Ticker Symbol
      • Using the Index Catalog
      • Ratio and Difference Symbols
      • Pseudo-Symbols
      • User-Defined Indexes
  • Charts & Tools
    • SharpCharts
      • SharpCharts Workbench
        • Creating and Viewing SharpCharts
        • Printing and Sharing SharpCharts
        • Editing SharpCharts
          • Using the SharpCharts Interactive Date Slider
          • Charting Market Breadth Indicators
          • SharpCharts Parameter Reference
        • Saving SharpCharts
        • Additional SharpCharts Workbench Tools
          • Viewing ChartLists on the SharpCharts Workbench
          • Viewing Alerts on the SharpCharts Workbench
          • Viewing Options Data on the SharpCharts Workbench
      • ChartStyles & StyleButtons
        • Working with ChartStyles and StyleButtons
        • Using the ChartStyle Library
        • Tool-Specific ChartStyles
      • ChartNotes
        • Annotating SharpCharts with ChartNotes
        • ChartNotes Annotation Tool Reference
          • Line Tools
          • Text Annotation Tools
          • Shape Tools
          • Line Study Tools
      • ChartLists
        • Summary View
        • ChartList View
        • ChartBook View
        • Performance View
        • Correlation View
        • Edit View
        • ChartList Reports
        • ChartPacks
      • Classic SharpCharts Workbench
      • StockCharts Mobile App
    • StockChartsACP
      • Creating ACP Charts
      • Multi-Chart Layouts in StockChartsACP
      • Viewing ACP Charts
      • Printing and Sharing ACP Charts
      • Editing ACP Charts
      • Applying Chart Templates to ACP Charts
      • Annotating ACP Charts
        • StockChartsACP Line Tools
        • StockChartsACP Text Annotation Tools
        • StockChartACP Shape Tools
        • StockChartsACP Line Study Tools
      • Working with Saved ACP Charts
      • StockChartsACP Plug-Ins
        • Chaikin Power Gauge Plug-In
        • GoNoGo Charts Plug-In
        • Larry Williams Stock Trading Starter Pack Plug-In
        • MarketGauge Plug-Ins
        • Simpler Trading Moxie Indicator Plug-In
        • Trading Simplified by Dave Landry
        • Trend Investor Pro Indicator Edge
    • Other Charting Tools
      • P&F Charts
      • GalleryView
      • Seasonality Charts
      • CandleGlance Charts
      • MarketCarpets
      • Interactive PerfCharts
      • RRG Charts
      • Dynamic Yield Curve
    • Research Tools
      • Symbol Summary
      • Options Summary
        • OptionsPlay Explorer
      • OptionsPlay Strategy Center
      • Market Summary
      • Sector Summary
      • Industry Summary
      • Index Members
      • StockCharts Technical Rank (SCTR) Reports
      • Earnings Calendar
      • Cryptocurrency Summary
    • Reports and Galleries
      • The Ticker Cloud
      • Historical Chart Gallery
      • Predefined Scan Results
        • Customizing Predefined Scans
      • Predefined Technical Alerts
      • DecisionPoint Chart Gallery
      • Public ChartLists
        • Becoming a Public ChartList Author
      • SharpCharts Voyeur
  • Scanning & Alerts
    • Technical Scans
      • Scanning for Stocks: The Basics
      • Advanced Scan Workbench
      • Standard Scan Workbench
      • Working With Scan Results
    • Scan Writing Resource Center
      • Planning Scans
      • Writing Scans
      • Scanning Tutorials
        • Scan Workbench Tutorial
        • Scan Results Tutorial 1
        • Scan Results Tutorial 2
        • Writing Scans Tutorial 1
        • Writing Scans Tutorial 2
        • Creating Scan Templates Tutorial
        • Troubleshooting Scans Tutorial 1
        • Troubleshooting Scans Tutorial 2
        • Troubleshooting Scans Tutorial 3
      • Scanning Case Studies
        • Scanning for Crossovers
        • Scanning for "Near Crosses"
        • Scanning for Divergences
        • Scanning for Relative Strength
        • Scanning for Consolidation and Breakouts
        • Scanning for Selling Climaxes
        • Scanning for SCTRs
        • Scanning Ichimoku Clouds
        • Scanning for P&F Chart Patterns
        • Scanning Your ChartLists
        • Scanning for an Overlay of an Indicator
        • Writing Min/Max Scans
        • Writing Percent Change Scans
        • Scanning Over a Range of Dates
        • Writing Scans With OR Clauses
      • Troubleshooting Scans
        • Troubleshooting Equality Scans
      • Getting Help With Scans
      • Scan Syntax Reference
        • Scan Syntax: Ticker Properties
        • Scan Syntax: Price, Volume, and SCTRs
        • Scan Syntax: Technical Indicators
        • Scan Syntax: Technical Functions
        • Scan Syntax: Predefined Patterns
        • Scan Syntax: Groups
      • Advanced Scan Library
        • Sample Scans
        • Predefined Scans
        • Published Scans
        • User-Contributed Scans
        • Gord Greer's Scan Building Blocks
    • Technical Alerts
      • Technical Alert Workbench
      • Your Alerts
  • Your Account
    • Subscribing to StockCharts
    • Service Levels & Data Plans
    • Login & Passwords
    • Your Account Settings
    • Managing Your Subscription
      • Cancelling Your Account
    • StockCharts Add-Ons
      • OptionsPlay Add-On
  • Learning More
    • Market Commentary
      • Blogs
      • ChartWatchers Newsletter
      • StockCharts TV
    • Educational Resources
    • Frequently Asked Questions (FAQs)
    • Step-By-Step Instructions
      • SharpCharts How-Tos
        • SharpCharts Workbench How-Tos
          • How to Print a SharpChart
          • How to Share a SharpChart on Social Media
          • How to Email a SharpChart
          • How to Insert a SharpChart in a Document or Presentation
          • How to View Indicator and Overlay Values for Specific Days
          • How to Save a SharpChart
        • SharpChart Editing How-Tos
          • How To Use The Interactive Date Slider
          • How to Display More than One Symbol on a SharpChart
          • How to Create Overlaid Charts
          • How to Add an Overlay to an Indicator
          • How to Add a Moving Average to the Volume Bars on a Chart
        • ChartNotes How-Tos
          • How to Pin an Annotation on a SharpChart
          • How to Save a Chart from a Blog Article with the Author's Annotations
        • ChartList How-Tos
          • How to Use the ChartList Summary
          • How to Search for a Saved Chart in Your ChartLists
          • How to Share a ChartList with Another Member
        • ChartList Editing How-Tos
          • How to Create a New ChartList
          • How to Add Predefined Symbol Groups to a New ChartList
          • How to Add Predefined Groups into an Existing ChartList
          • How to Upload Symbols to a ChartList from a Spreadsheet
          • How to Rearrange Charts in a ChartList
          • How to Delete a Saved Chart from a ChartList
      • StockChartsACP How-Tos
        • Setting Period, Type And, Range
        • Chart Attributes
          • Part One
          • Part Two
        • Sharing And Printing
        • Saving Charts
          • Saving A New Chart
          • Saving An Existing Chart As New
        • Chart Templates
          • Applying Predefined Chart Templates
          • Saving A New Chart Template
        • Using ChartLists
          • Creating A New ChartList
        • Chart Layouts
          • Accessing Chart Layouts
          • Creating A New Custom Layout
        • Additional Tools
          • Accessing Research Tools
    • Troubleshooting
      • Unable to Log In
      • Website Slow or Down
        • Using OpenDNS
      • Website Functionality Issues
    • Customer Support
    • Policies & Limitations
      • Terms of Service
      • Privacy Statement
      • No Service Level Guarantees
      • Data Policies
      • Usage Limitations
      • Reprint Permission Policies
      • Billing Policies
      • Membership Policies
      • Public ChartList Policies
      • Customer Support Policies
Powered by GitBook
LogoLogo

ON STOCKCHARTS

  • Charts & Tools
  • Articles
  • StockCharts TV
  • ChartSchool

MEMBERS

  • Your Dashboard
  • Your ChartLists
  • Advanced Scans
  • Technical Alerts

HELP

  • Support Center
  • FAQs
  • Contact Us
  • Pricing

COMPANY

  • About Us
  • What's New
  • Careers
  • StockCharts Store

© StockCharts.com, Inc. All Rights Reserved.

On this page
  • Adding a Percent Change Clause
  • Scanning for Big Moves
  • A Note on Oscillators
  • Ranking Within a Group
  • Scanning for Comparison to a Benchmark
  • The Bottom Line

Was this helpful?

Export as PDF
  1. Scanning & Alerts
  2. Scan Writing Resource Center
  3. Scanning Case Studies

Writing Percent Change Scans

When scanning for stocks that have made big moves, it is smart to measure those moves as a percentage rather than a flat value. A $5 price change is huge for a $10 stock, but barely noticeable on a $1000 stock. Our PctChange() scan function makes these types of scans a breeze, but it can also do much more. Let's take a closer look.

Adding a Percent Change Clause

To add a Percent Change clause to your scan, go to the Advanced Scan Workbench. From the “Technical Indicators” menu in the Scan Components area, choose “PctChange” and click the “Add” button.

By default, the scan clause looks like this:

[PctChange(10,close) > 10]

The first parameter for the PctChange() function shows the number of periods in the timeframe that you're measuring. The second parameter tells the scan engine what set of data to use for the calculations. By default, the clause uses daily close data, calculating the percentage change of the daily closing values over the last 10 days.

To scan using a different set of data (volume, MACD Line, etc.), simply replace “close” in the scan clause with another expression. For example, the following clause scans for stocks where the Bollinger Band Width has increased by more than 10% over the last 5 days:

[PctChange(5,BBWidth(20,2)) > 10]

The percent change is calculated by taking the difference between the value today and the value on the specified number of days ago, dividing it by the value on the earlier date and multiplying the result by 100.

The following two scan clauses are equivalent, but the PctChange one is much simpler to write:

[[[today's close - 10 days ago close]/[10 days ago close]]*100 > 7]

[PctChange(10,close) > 7]

Scanning for Big Moves

PctChange() is commonly used to scan for significant changes (either up or down) in price, volume, or indicator values over a specific period.

The following example clause scans for securities whose closing price has increased by at least 7% over the last 10 days:

[PctChange(10,close) > 7]

To look for large drops, simply compare to a negative number. This clause scans for securities whose closing price has decreased by at least 7% over the last 10 days (where the percentage change is less than -7%):

[PctChange(10,close) < -7]

Remember that PctChange() isn't just for price data. It can also be calculated for MACD, moving averages, BB Width, volume - virtually anything available on the “Price, Volume & SCTRs” or “Technical Indicators” menus in the Advanced Scan Workbench. The following clause looks for securities whose RSI value has dropped by at least 20% over the previous 10 days.

[PctChange(10,RSI(14)) < -20]

A Note on Oscillators

Calculating percentage change can result in some unexpected numbers when you are dealing with values close to zero. For example, when you're looking at a penny stock, a price increase of one cent could easily be a 100% change in price.

Oscillators like the MACD, which oscillate around the zero line, run the same risk. If your indicator value is near 0 and changes by just a very small amount, the percentage change could be enormous. For example, a change from 0.01 to 0.03 is a 200% increase.

When scanning for the percentage change of oscillators, it is especially important to manually review the results of your scan. A quick glance at the chart for each symbol in your results will quickly tell you whether or not they are of further interest. If you're getting a large number of irrelevant scan results, you may need to adjust your scan parameters or refine your scan with additional clauses.

Ranking Within a Group

We can also use the PctChange() function in RANK BY clauses, as shown below:

[group is DOW30]
RANK BY [PctChange(20,close)]

The example above shows all the stocks in the Dow Jones Industrial Average, ranked by their percentage price change over the last 20 days.

This technique can be used for all kinds of “groups,” including indexes, exchanges and even your own ChartLists.

Scanning for Comparison to a Benchmark

Percent Change clauses can also be used to compare values to a benchmark. For example, let's say we want to know which S&P 500 stocks are outperforming the S&P 500 index over the last 50 days.

This example requires two scans. First, we scan to find out the percentage change of the S&P 500 itself:

[symbol = '$SPX']
RANK BY [PctChange(50,close)]

This scan will return one result ($SPX) and the RANK BY clause will display the value for the 50-day percent change for $SPX:

The 50-day percent change for $SPX (in this example, 4.157) can be plugged in to a second scan to show which S&P 500 stocks are outperforming the $SPX:

[group is SP500]
and [PctChange(50,close) > 4.157]

This second scan will show all the stocks in the S&P 500 that have a higher 50-day percent change than $SPX itself.

Note that the $SPX percent change will fluctuate daily, so you will need to scan to get the current value and update your second scan with that value every time.

The Bottom Line

The PctChange() function is traditionally used to scan for noteworthy changes in price, but it can be used to determine the percentage change of almost anything, including volume or indicator values. This versatile function is not only used to find sharp increases or decreases, but can also be used to compare to a benchmark or rank within a group.

PreviousWriting Min/Max ScansNextScanning Over a Range of Dates

Last updated 12 months ago

Was this helpful?

Learn More.

Scanning for Relative Strength