Before you write a scan to find stocks in our scan engine, you first need to decide what kind of stocks you are looking for. Taking the time to plan your scan will pay off in more targeted, actionable scan results.
A robust scan has three main parts:
If you're only interested in S&P 500 stocks, or mutual funds, or London stocks, then there's no sense in searching the tens of thousands of stocks in our scan engine. Instead, limit your universe to only the groups of stocks that you would potentially invest in.
Using our scan engine syntax, you can limit your universe to certain types of securities (e.g. stocks or ETFs or mutual funds), certain exchanges or countries, members of specific index groups (e.g. Dow Jones Industrial Average or the Nasdaq 100), certain sectors or industries, and more.
You can also define your universe using basic price and volume information: e.g. limiting to Canadian stocks that averaged at least $10 in price and 40,000 in volume over the last 60 trading days.
Putting these kinds of universe-defining statements at the beginning of your scan not only limits the results to a more manageable size, it has the added benefit of speeding up your scan. If your scan is only searching the 400 stocks in the S&P 400, it will run much more quickly than if it is searching thousands of stocks.
In addition to specifying the general group of stocks to search, you can add technical requirements that further limit your universe.
For example, if you are looking for stocks where the bigger trend is up, then you want your scan to only find stocks that are in a longer-term uptrend. You could require price to be above the 200-day simple moving average (SMA) and/or require the 50-day SMA to be above the 200-day SMA; these are conditions that are usually true when a stock is in an uptrend.
You may also want to add conditions to ensure that the stock hasn't already made its big move. For example, you could add a technical condition limiting your results to stocks where the PPO is less than 1%. Higher PPO values usually indicate that a big move has already taken place, and it is no longer a good time to buy.
Once you've defined your universe of stocks and the technical conditions that must be present, you may still be left with a lot of stocks in your scan results. More importantly, they may have been meeting those criteria for weeks or months. How do you know that you want to invest in a stock right now? That's where the signal comes in.
A signal indicates something that is happening today (not yesterday or last week or last month), that tells you now is the right time to buy. Unlike the previous scan criteria that just checked whether the stock met the requirements or not, the signal adds a time component. The signal criteria is checking whether the stock just started meeting the criteria today.
This is usually accomplished with a crossover scan criteria, e.g. MACD crossing above zero or price crossing above its 50-day SMA. A stock doesn't cross over a threshold over the course of weeks or months; it crosses over on a certain day, and that crossover event signals that it is time to buy.
How do you decide which conditions and signals to use in your scan? We recommend studying charts for stocks that you wish you'd invested in. For each chart, identify the timeframe where you would like to have purchased that stock.
Then look at several indicators for those charts, to see what the indicator values were doing during that buy timeframe. If an indicator behaves consistently across your charts during that timeframe, then that may make a good technical condition to refine your universe. For example, if most of your charts show the PMO rising during their buy timeframe, you may want to add that condition to your scan.
Next look for crossover signals that happen during the buy timeframe on your charts. If an indicator consistently crosses a certain threshold during that timeframe, then that crossover is a potential signal. Building on our example above, if the PMO crosses its signal line during the buy timeframe on many of your charts, then you may want to use that as the signal for your scan.
Now that you know what you want to include in your scan, read on to learn how to build your scan in the Advanced Scan Workbench.