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
  • Running the Scan
  • Determining the Problem Clause
  • Investigating the Problem Clause
  • Correcting the Problem Clause
  • Learn More

Was this helpful?

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

Troubleshooting Scans Tutorial 1

PreviousCreating Scan Templates TutorialNextTroubleshooting Scans Tutorial 2

Last updated 1 year ago

Was this helpful?

This tutorial will walk you step-by-step through troubleshooting a scan that is unexpectedly returning zero results. Our scanning tutorials assume only a basic knowledge of common technical indicators and chart patterns. This tutorial may build on skills learned in prior scanning tutorials (links are provided where appropriate).

By the end of this tutorial, you will be able to troubleshoot a scan that does not return any results, determine which specific clause is causing the problem and use different strategies to fix the problem. Once you've mastered these skills, be sure to check out our to learn about and practice other aspects of scanning.

Here's a Tip: We recommend printing out this page or opening it in another tab so that you can refer to it as you follow along on your computer.

Running the Scan

Step 1: Open the Advanced Scan Workbench and add the following scan clauses in the Scan Editor Box:

[type = stock]
and [daily sma(20,daily volume) > 40000]
and [Upper BB (20,2) < close]
and [RSI (14) > 50.0]
and [%B (20,2) < 0]
and [close > 12]

This is a relatively simple scan, searching for stocks that meet basic price and volume requirements and have desirable values for three different technical indicators.

Step 2: Click the “Check Syntax” button to ensure everything has been typed in correctly, then click “Run Scan.”

If you are not familiar with the process for running a scan in the Advanced Scan Workbench, we recommend accessing our , which will help you build and run the scans like the one listed above.

Step 3: Check out the scan results in the new browser window (or new tab in your current browser window) that opens up. Notice that zero results are returned. Even though there were no errors when you clicked the “Check Syntax” button, something is wrong, as we would normally expect a simple scan like this to get several results.

Determining the Problem Clause

When you have a long scan with multiple clauses, it can be difficult to narrow it down to the specific clause that is causing problems. The best way to do this is to use comments to temporarily disable/remove clauses from your scan. Start by commenting out all but the first clause, then add clauses back one at a time until you no longer receive any results for the scan. The clause that you just added back in is the problem clause.

Step 4: Put two forward slashes in front of each clause (except the first one). This will turn those clauses into comments that will be ignored by the scan engine:

[type = stock]
// and [daily sma(20,daily volume) > 40000]
// and [Upper BB (20,2) < close]
// and [RSI (14) > 50.0]
// and [%B (20,2) < 0]
// and [close > 12]

Step 5: Click the “Check Syntax” button, then click “Run Scan” and check out the scan results. With all clauses disabled except for the first one, you should see 2000 results. This scan is essentially just searching for all stocks in our database.

Step 6: Uncomment the clause about the SMA (simple moving average) of volume, then run the scan again. You should still get 2000 results.

Step 7: Uncomment the clause about the Upper BB indicator, then run the scan again. You should still get hundreds of results.

Step 8: Uncomment the clause about the RSI indicator, then run the scan again. You should still get many results.

Step 9: Uncomment the clause about the %B indicator, then run the scan again.

At this point, you should suddenly get zero results. This %B clause is likely our problem clause; consequently, that is where we want to concentrate our troubleshooting efforts.

Investigating the Problem Clause

Getting zero results for your scan can be caused by any number of issues. Examples of such issues include: typos in your clause, not using the intended values or operators, scanning for something that will never be true (e.g. scanning for stocks where the close is greater than the high for the day), contradictory clauses (where two clauses are searching for two things that are unlikely ever to occur together), etc.

Step 10: Click the “Check Syntax” button to check for typos.

You should understand that passing the syntax check doesn't necessarily mean there aren't any typos in your scan. The check can determine if you've spelled the name of an indicator incorrectly, for example, but it can't tell that you meant to search for an RSI value greater than 70 instead of 90. For those kinds of issues, you just have to scrutinize the problem clause closely to make sure it really matches up with your scan requirements.

The trickiest kind of issue is a contradictory clause. In that situation, you need to look beyond your problem clause and look at how it might interact with other clauses in the scan. In our example above, what we have is a contradictory clause: the %B clause, as written, requires the closing price to be below the lower Bollinger band, but the Upper BB clause says that the price is above the upper Bollinger band. No stocks can be both above the upper and below the lower band at the same time.

Correcting the Problem Clause

Once you've found the problem, you will need to correct the scan syntax. Of course, the way to correct it may vary from person to person. In this case, perhaps we meant for %B to be greater than zero. Alternatively, it may not about that clause at all; perhaps we meant for the close to be below the upper Bollinger band instead of above it. Another possibility is that we might have meant to have a date modifier on the %B clause, so we would look for stocks that were below the lower band last week, but are above the upper band today. Only you know what your scan is supposed to be scanning for, so only you can fix it.

Step 11: Correct the example scan so that the clauses are no longer contradictory, in whatever way you would like. For example, you can correct it to scan for %B to be greater than zero, as shown below:

and [%B (20,2) > 0]

Step 12: Run the corrected scan to confirm that you now get results.

Step 13: Once you are happy with your scan, be sure to save it so that you can rerun it again later.

Learn More

If you are not familiar with the process for saving your scan in the Advanced Scan Workbench, we recommend accessing our , which will walk you through the process step by step.

Now that you've learned some techniques for troubleshooting scans that get no results check out our to learn how to fix your scan when it returns too many results.

For more in-depth information on writing and troubleshooting scans, please check out our and articles in the Support Center.

first Writing Scans Tutorial
second Troubleshooting Scans Tutorial
Writing Scans
Troubleshooting Scans
other scanning tutorials
tutorial on this topic