KnowledgeBase/Documentation

Advanced Scan Workbench - User Documentation

StockCharts Support February 01, 2009

Only available to our Extra and PRO subscribers, the Advanced Scan Interface provides you with an amount of flexibility not available through the Standard Scan Interface. It can do all of the things that the standard interface can do with several important additions, such as:

1) The ability to create conditions with multiple indicators on each side of the Comparison Operator.

2) The ability to create scans that join different conditions together with "OR" logic.

The standard scan interface can transfer your criteria into the advanced scan interface so that you can make additional edits if desired. If you are new to scans we recommend you read our Understanding Stock Scans page and our Standard Scan Manual, then start working with the standard scan interface until you feel comfortable enough to move to advanced scans. For many, the standard scan interface will provide sufficient flexibility for their scans.

 

By the way, if you are just learning to create scans, we recommend that you download and print our Scan Tutorial and then slowly follow its directions. Scanning is incredibly useful but it does take time to learn.  You might also want to review the information and example scans in our Scanning Stocks blog.

To access the Advanced Scan interface, go to the Standard Scan workbench and click the Screen_shot_2010-08-23_at_11.31.22_AM.png button at the bottom of the page.

Scans are an invaluable resource for technical analysis; they allow you to envision a desirable chart and then see it in the real world. The Advanced Scan interface is for users who desire complete control over the scan engine, allowing for virtually any form of criteria rather than simply the most common forms.

A downside to the advanced scan interface is the amount of room for error on the part of the user. For this reason it is advised that you start your scans in the standard scan interface and then transfer them to the advanced interface. We encourage all our Extra and PRO subscribers to use our scan engine and, if you ever feel constrained by the Standard Scan interface, to experiment with the Advanced version.

AdvWB.png

The Advanced Scan Interface is composed of three main parts: The starting date adjuster, the scan expression box, and the scan builder. The scan expression box is what the scan engine ultimately uses to run the scan. Commands can either be inserted through the scan builder or from the Standard Scan interface, or they can be entered by hand. See below for more details on these sections.

Screen_shot_2010-08-23_at_11.32.39_AM.png

Near the top of the page you will see the above text and drop-down boxes. These can be used to specify the time from which the scan will be performed.

You can change the number in the first box to run your scan "in the past" and see what results would have been generated. You can specify any number up to 500 in this box but keep in mind that, depending on your scan criteria, the further back you go, the less accurate your results will be. You can also scan from the last market close or the last intraday update.

Screen_shot_2011-04-18_at_11.18.13_AM.png

 

The scan expression region contains the criteria used to run the scan. All commands must be entered into this box or inserted through the scan builder.  The number in the upper right displays how many characters are remaining in the scan expression.  Scan expressions must be less than 2560 characters.

Directly below the expression box there are three buttons that can be used to reset the scan expression, run the scan, or check the syntax. Whenever you add a clause it is always a good idea to check the syntax so that if you make a mistake, it will be caught right away. If there is a syntax error, text will appear at the bottom of the box that identifies the problem.

If you see this message:
Syntax Correct
Then you are ready to run the scan.

For some examples of scan criteria, click on any of the "help" links on the page. The help link is found at the top right corner of the Scan Builder box, as shown below.

ScanBuilder.png

The Scan Builder can be used to insert common clauses that you need. The clauses that you can insert are broken down into nine different categories, each having its own drop-down box. Once you select a clause from the menu, hit the Screen_shot_2010-08-23_at_11.34.52_AM.png button and it will be placed in the Expressions Box with the default values. You will probably want to modify these default values by hand in the Expressions box.

These are short commands used in the Expressions Box that are used often within the Scan Builder clauses. It is important to be familiar with these commands if you plan on customizing any of the criteria. Often times there are multiple ways to express the commands, such as through both words and symbols ("=" and "equals").

Here is a brief description of these operators, with the synonyms in quotations.

The comparison operators compare one value or indicator to another:

= "equals" 
>= is greater than or equal to
> is greater than
<= is less than or equal to
< is less than
!= is not equal to
x "crosses"

Standard arithmetic operators are available for use in any expression:

+ Plus
- Minus
* Multiplied by
/ Divided by

You can use several additional keywords to specify a date offset for an indicator of other value. Supported date offset keywords include:

today('s)yesterday('s)n days agothis week('s)last week('s)n weeks ago
The most recent daily price or indicator value
The daily price or indicator value from the previous trading day.
The daily price or indicator value n trading days ago when n is a positive whole number less than 500
The weekly price or indicator value for the current week.
The weekly price or indicator value for the previous week.
The weekly price or indicator value n weeks ago where n is a positive whole number less than 100.

You can specify whether an indicator is calculated using daily price bars or weekly price bars by using the following modifiers:

Daily (Default)Weekly
The associated indicator function will use daily price bars in its calculations.
The associated indicator function will use weekly price bars in its calculations.

Clauses are joined together with logical operators. The logical operators the scan interface supports are:

andor
If both of the joined clauses are true then the combined expression is true.
If either of the joined clauses are true then the combined expression is true.

When using clauses separated by the logical operator "OR", it is important that you pay close attention to your square brackets. To illustrate the reason for this we'll look at an example. If we start with a scan for stocks with a Double Top:

[Type = Stock] and [Double Top is True]

and we decide that we want to include stocks that have a Triple Top pattern as well, we would start by adding that clause separated with an "OR". This gives us:

[Type = Stock] and [Double Top is True] or [Triple Top is True]

Unfortunately, if you run that scan, you'll get results that include Indices and Mutual Funds even though you specifically specify that you just want Stocks. The problem is that the last clause is evaluated entirely independently from the rest. To fix this we need to add square brackets around the clauses we want evaluated together. In this case we will want to add square brackets around the two pattern clauses:

[Type = Stock] and [ [Double Top is True] or [Triple Top is True] ]

Now the two clauses will be evaluated together and the scan will give us the desired results.

There are several ticker properties that you can set as filters for your scan.

Screen_Shot_2013-01-23_at_1.32.12_PM.png

 

Type: The type of each ticker symbol. Acceptable values are "Stock", "Index", and "Fund".
Symbol: Can specify that the symbol "starts with", "ends with", or "contains" certain letters.
Name: Can specify that the name "starts with", "ends with", or "contains" certain letters.
Country: The country of the exchange it is traded on. Acceptable values are "US" and "Canada" .

Region: A broader area than a specific country.  Acceptable is are "NorthAmerica".
Exchange: The exchange that each stock trades on, either "NASDAQ", "NYSE", "PINK", "AMEX", "TSE" or "VENTURE".
EPS: Each stock's last reported Earnings Per Share value.
PE Ratio: Each stock's last reported Price-Earnings Ratio.

Market Cap: Each stock's last reported Market Capitalization.  Market Capitalization is expressed in million dollar increments.

Optionable: The stock trades options.

Has Dividend: The stock pays a dividend.

Dividend: Amount of the annualized dividend.

Yield: Yield (in percent) based on the annualized dividend.

 

Select any of these properties from the drop-down menu, click Screen_shot_2010-08-23_at_11.34.52_AM.png, then edit the fields in the Expressions Box if you want to use parameters other than the default ones.

AdvSctrList.png

This field contains price, volume and SCTR entries:

  • High: The largest price value for each ticker during each period.
  • Close: The last price value for each ticker during each period. Note that when the market is open and an intraday scan is used, the 'Close' value is equal to the most recent price for each stock.
  • Open: The first price value for each ticker during each period.
  • Low: The smallest price value for each ticker during each period.
  • Volume: The number of shares traded during each period.
  • Range: The value of the High minus the value of the Low for each period.
  • SCTR: All existing SCTR types
  • SCTR.sp5: S&P 500 SCTR values
  • SCTR.sp4: S&P 400 SCTR values
  • SCTR.sp6: S&P 600 SCTR values
  • SCTR.us.etf: U.S. listed ETF SCTR values
  • SCTR.tsx: Toronto exchange SCTR values

Furthermore, all of the technical indicators available on our charts are available as Indicator Functions in our scan engine and can be selected from the Technical Indicators menu. A comprehensive list of indicator functions is described below.

Screen_Shot_2013-01-02_at_2.17.54_PM.png

Select any of these properties from the drop-down menu, click Screen_shot_2010-08-23_at_11.34.52_AM.png, then edit the fields in the Expressions Box if you want to use parameters other than the default ones.

Screen_shot_2010-08-23_at_11.48.05_AM.png

The scan engine can be programmed to search for charts that either do or do not display specified candlestick patterns.

The criteria will appear as a true/false parameter. For example:

[Piercing Line is true] will search for charts with the Piercing Line pattern.
[Piercing Line is false] will exclude charts with the Piercing Line pattern.

The scan engine can also search on more discrete candlestick patterns called Candlestick building blocks.  Customized candlestick patterns can be created via the building blocks.  These criteria will also appear as true/false parameters.  For example:

[Marubozu is true] will search for charts with a Marubozu pattern.

Screen_shot_2011-04-18_at_12.14.43_PM.png

For detailed descriptions of candlestick patterns, see our ChartSchool Chart Analysis page.

 

Select any of these properties from the drop-down menu, click Screen_shot_2010-08-23_at_11.34.52_AM.png, then edit the fields in the Expressions Box if you want to use parameters other than the default ones.

Screen_shot_2010-08-23_at_11.48.35_AM.png

The scan engine can be programmed to search for charts that either do or do not display specified Point and Figure patterns.

The criteria will appear as a true/false parameter. For example:

[Bullish Triangle is true] will search for charts with the Bullish Triangle pattern.
[Bullish Triangle is false] will exclude charts with the Bullish Triangle pattern.

Select any of these properties from the drop-down menu, click Screen_shot_2010-08-23_at_11.34.52_AM.png, then edit the fields in the Expressions Box if you want to use parameters other than the default ones.

Screen_shot_2010-08-23_at_11.49.33_AM.png

These properties are not quite as straightforward as "true/false" parameters, but they still follow a structured and consistent formula.

For example, the New 52-week high would be entered like this:

 

[today's high > yesterday's daily max(260,high)]

Notice the "max" expression is used with 260 days as the period, meaning that it evaluates the daily high.

Select any of these predefined scans from the drop-down menu, click Screen_shot_2010-08-23_at_11.34.52_AM.png, then edit the fields in the Expressions Box if you want to use parameters other than the default ones.

Screen_shot_2010-08-23_at_11.50.18_AM.png

The scan engine recognizes each group by a unique ID code. Therefore, when you insert a group expression such as "Gold & Silver", it will look like:

[group is GoldSilver]

Now the scan engine will only search within the Gold & Silver Sector.

Select any of these groups from the drop-down menu and click Screen_shot_2010-08-23_at_11.34.52_AM.png.

Screen_shot_2010-08-23_at_11.51.07_AM.png

Just like the sector and industries, the scan engine recognizes each index group by a unique ID code. Therefore, when you insert a group expression such as "S&P 500", it will look like:

 

[group is SP500]

Now the scan engine will only search within the S&P 500 Index.

Select any of these groups from the drop-down menu and click Screen_shot_2010-08-23_at_11.34.52_AM.png.

Screen_shot_2010-08-23_at_12.11.06_PM.png

You also have the ability to have the scan engine search your favorite lists. So if you, for example, wanted to see all the stocks in your "My Tech Stocks" list that have reached their 52-week highs, the command would be:

 

[today's high > yesterday's daily max(260,high)] and [favorites list = 2]

Notice that "My Tech Stocks" is assigned "2" on the drop-down menu.

Select any of these lists from the drop-down menu and click Screen_shot_2010-08-23_at_11.34.52_AM.png.

Saving the scan criteria allows you to run your custom scans any time you want without re-entering all the filters. Likewise, if you obtain results that you find useful, you can save them all as a "Favorites" list for further analysis.

Once you enter in all the criteria you desire, you can either:

  • Click Add/Modify the Current Scan under the drop-down menu in the top right. Enter a description for the scan and click "OK"
    Screen_Shot_2013-05-13_at_10.32.54_AM.png

OR

  • Scroll down to Managing Your Favorite Scans and click on Add/Modify the Current Scan. Enter a description for the scan and click "OK".
    Advanced Scan Favorites

Manage Saved Scans:

To manage the scans you have creatd click "View All Scan" link located below the Your Favorite Scans drop-down. Once the page displays you can check off the box to the left of the scans title and click "Remove the selected scans" to easily delete them from your account.This is also a great way to see in list format all your saved scans and their description.

Screen_Shot_2013-05-13_at_10.36.00_AM.png

Once you run the scan, you will see this menu on the scan results page:

Screen_Shot_2013-05-06_at_3.15.09_PM.png

Click on Put these results into a new ChartList to save all of the results. Enter a description for the scan and click "OK". You may want to put your new list in a CandleGlance display to pick out charts that you like or dislike.

Options to select from are:

  • Store these results in a new ChartList
  • Merge these results with an existiing ChartList
  • Replace an existing ChartList with these results
  • Download in CSV Format

This list describes and provides examples for criteria for clauses that are found in the Price, Volume, and Indicators menu.

FunctionDescriptionParameter(s)Examples
SMA(nPeriods, exp)
EMA(nPeriods, exp)
The moving average for the given expression such as "close", "volume", or "rsi(14)". More Info nPeriods - Number of periods
exp - expression
[SMA(20, close) < 25]
[EMA(20, volume) > 60,000]
Max(nPeriods,exp)

Min(nPeriods,exp)

Returns the highest/lowest value for the given expression during the specified time period. nPeriods - Number of periods

exp - expression

max(260,high)

min(260,low)

Absval(exp) Returns the positive version (the absolute value) of the expression. exp - expression [AbsVal (PctChange(10,close)) >30]
PctChange(nPeriods,exp) Returns the percentage change in value over nPeriods for the expression. nPeriods - Number of periods

exp - expression

 [PctChange (10,close) > 10]
PctDiff(exp,exp) Returns the percentage difference between the expressions.

exp - expression

exp - expression

PctDiff(close,SMA(50,close)) < 10
MACD Line(nShort, nLong, nSignal)
MACD Signal(nShort, nLong, nSignal)
MACD Hist(nShort, nLong, nSignal)
The values of the MACD indicator line, its corresponding EMA signal line, and the MACD histogram. More Info nShort: Number of periods for the short EMA
nLong: Number of periods for the long EMA
nSignal: Number of periods for the signal line 
[MACD Signal(12,26,9) > 0.0]
PPO Line(short, long, signal)
PPO Signal(short, long, signal)
PPO Hist(short, long, signal)
The values of the PPO indicator line, its corresponding EMA signal line, and the PPO histogram. More Info nShort: Number of periods for the short EMA
nLong: Number of periods for the long EMA
nSignal: Number of periods for the signal line
PVO Line(12,26,9) > 0.0]
Fast Stoch %K(nPeriods, nSignal)
Fast Stoch %D(nPeriods, nSignal)
Slow Stoch %K(nPeriods, nSignal)
Slow Stoch %D(nPeriods, nSignal)
The values of the Fast and Slow Stochastic Oscillator indicators and their corresponding signal lines. More Info nPeriods: Number of period used to calculate %K
nSignal: Number of periods for the signal line
Fast Stoch %K(14,3) > 80.0] [Slow Stoch %K(14,3) > 80.0]
Full Stoch %K(nPeriods, nSmoothing, nSignal)
Full Stoch %D(nPeriods, nSmoothing, nSignal)
The values of the Full Stochastic Oscillator. More Info nPeriods: Number of periods used to calculate %K
nSmoothing: Number of periods used to smooth %K
nSignal: Number of periods for the signal line
[Full Stoch %D(14,3,3) > 80.0] [Full Stoch %K(14,3,3) > 80.0]
ADX Line(nPeriods) The value of the Average Directional Indicator. More Info nPeriods: The number of periods used to compute the ADX Line [ADX Line(14) > 20.0]
Plus DI(nPeriods) The value of the Positive Directional Indicator. More Info nPeriods: The number of periods used to compute the Directional Index [Plus DI(14) > Minus DI(14)]
Minus DI(nPeriods) The value of the Negative Directional Indicator. More Info nPeriods: The number of periods used to compute the Directional Index [Plus DI(14) > Minus DI(14)]
Aroon Up(nPeriods)
Aroon Down(nPeriods)
Aroon Osc(nPeriods)
The values of the Aroon indicators and the Aroon Oscillator. More Info nPeriods: The number of periods used in the computation [Aroon Down(25)< 30.0] [Aroon Osc(25)>0.0]
Upper BB(nPeriods, stdDev, param)
Lower BB(nPeriods, stdDev, param)
BB Width(nPeriods, stdDev, param)
The values of the upper and lower Bollinger Band lines and their width. More Info nPeriods: Number of periods
StdDev: Distance of the bands from the centerline
param: The property to be used in the computation
[Upper BB(20,2,close) < close]
[BB Width(20,2,close) > 9.99]
RSI(nPeriods) The value of Wilder's RSI indicator. More Info nPeriods: The number of periods used in the computation [RSI(14) > 70.0]
CMF(nPeriods) The value of the Chaikin Money Flow indicator. More Info nPeriods: The number of periods used in the computation [CMF(20) > 0.0]
CCI(nPeriods) The value of the Commodity Channel Index. More Info nPeriods: The number of periods used in the computation [CCI(20) > 100.0]

Chandlr(nPeriods, mult,long/short)

The value of the Chandelier Exit overlay.  More Info

nPeriods - Number of periods

multiplier - ATR multiplier long/short - (optional)  Default is long

 

[Chandlr(22,3.0,long) > close]

ATR(nPeriods) The value of the Average True Range indicator. More Info nPeriods: The number of periods used in the computation [ATR(14) > 2.0]
William's %R(nPeriods) The value of the William's %R indicator. More Info nPeriods: The number of periods used in the computation [William's %R(14) < -20.0]
Stoch RSI(nPeriods) The value of the StochRSI indicator. More Info nPeriods: The number of periods used in the computation [Stoch RSI(14) > 0.80]
Chaikin Osc(nShort, nLong) The value of the Chaikin Oscillator. More Info nShort: The smaller number of periods used in the computation
nLong: The larger number of periods used in the computation
[Chaikin Osc(3,10) >9,999,999]
Parabolic SAR(step, maxStep) The value of the Parabolic Stop and Reversal (PSAR) overlay. More Info step: The step used to compute the SAR
maxStep: The maximum step size
[Parabolic SAR(0.02,0.2) < low]
Ultimate Osc(nShort, nMedium, nLong) The value of the Ultimate Oscillator. More Info nShort: The short period used in the calculation
nMedium: The medium period used in the calculation
nLong: The long period used in the calculation
Ultimate Osc(7,14,28) > 70.0]
OBV The value of the On Balance Volume (OBV) indicator. More Info   [OBV > yesterday's OBV]
OBV Signal(nPeriods) The average of OBV over a given period of time. More Info nPeriods: The number of periods used in the computation [OBV Signal(30) > OBV]
AccDist The value of the Accumulation/Distribution Line. More Info   [AccDist>yesterday's AccDist]
AccDist Signal(nPeriods) The average of the Accumulation/Distribution Line over a given period of time. More Info nPeriods: The number of periods used in the computation [AccDist Signal(20)> AccDist]
ROC(nPeriods) The value of the Rate of Change (ROC) indicator. More Info nPeriods: The number of periods used in the computation [ROC(12)>0.0]
ROC Signal (nPeriods, nSignal) The average of the Rate of Change indicator over a given period of time. More Info nPeriods: The number of periods used in the computation
nSignal: The number of periods used to compute the signal line
[ROC Signal(12,30)>ROC(12)]
P&F Box Count The number of boxes in the current column on the P&F Chart. More Info  

[P&F Box Count > 10]

 

TRIX(nPeriods, nSignal) The value of the TRIX indicator. More Info

nPeriods: The number of periods used in the computation

nSignal: The number of periods used to compute the signal

[TRIX signal(15,9) <TRIX(15,9)]
%B(nPeriods, std dev, param) The value of Bollinger's %B indicator.

nPeriods: The number of periods used in the computation

StdDev: Distance of the bands from the centerline

Param: The property of the bands from the centerline

[%B(20,2,close) >1]
DPO(nPeriods) The value of the Detrended Price Oscillator (DPO). nPeriods: The number of periods used in the computation [DPO(20) > 0]
Force Index(nPeriods) The value of the Force Index.  More Info nPeriods: The number of periods used in the computation [Force(13) > 0.0]
Money Flow Index(nPeriods) The value of the Money Flow Index. More Info nPeriods: The number of periods used in the computation [MFI(14) > 80]
Slope(nPeriods) The value of the Slope indicator. nPeriods: The number of periods used in the computation [Slope(20) > 0]
Standard Deviation(nPeriods) The value of the Standard Deviation indicator. More Info nPeriods: The number of periods used in the computation [Std Deviation(10) >2]

Upper Keltner Channels(nPeriods, multiplier, ATR param)

Lower Keltner Channels(nPeriods, multiplier, ATR param)

The values of the upper and lower Keltner Channel lines. More Info

nPeriods: The number of periods used in the computation

multiplier: Distance of the bands from the centerline

ATR param: The number of periods used to compute ATR

[Upper Kelt Chan(20,2,10,close)< close]

[Lower Kelt Chan(20,2,10,close)> close]

Upper Price Channels(nPeriods,param)

Lower Price Channels(nPeriods, param)

The values of the upper and lower Price Channel lines. More Info

nPeriods: The number of periods used in the computation

Param: The property of the bands from the centerline

[Upper PriceChan(20,close)< close]

[Lower PriceChan(20,close)> close]

Upper MA Envelope(nPeriods,percentage,param)

Lower MA Envelope(nPeriods, percentage,param)

The values of the upper and lower Moving Averages Envelope lines. More Info

nPeriods: The number of periods used in the computation

Percentage:Distance of the bands from the centerline

Param: The property of the bands from the centerline

[Upper MA Env(20,2.5,close)< close]

[Upper MA Env(20,2.5,close)> close]

While running scans, if you run into trouble at any time there are additional links at the bottom of the page in the Action Bar which can help you out.

Screen_shot_2010-08-23_at_11.53.18_AM.png

  • Instructions: Opens this scan engine help page.
  • Understanding Scans: Opens a help page that discusses how to interpret and construct scans.
  • Scan Definitions: Brings you to the main scan page, which includes an explanation of each type of scan.

Additional Resources

To learn more on understanding the Basic of the advanced scan workbench refer to this video.

To learn more on viewing your scan results refer to this video.

To learn more on how to manage your scans refer to this video.

 
Topic is closed for comments