|
SCANS
HOME
SCANS TOUR
SCAN INTERFACE
SCAN
PROPERTIES
[menuLeft.htm]
|
Investor/RT
Scans Properties
A Scan is a specification for searching through all of the
instruments in a particular quote pag to identify those whose current or historical market
data exhibit defined characteristics. The result of a scan is a quote page that lists the
instruments that match the criteria requested in the scan. Also noted in the resultant
quote page are the quantitative values for the requested criteria. A scan can also be
considered a "signal", in other words, a specification of some market related
criteria that the user considers meaningful as a trading signal to buy or sell.
Scans can be shown historically in a chart window with each bar marked with a
distinctive marker to signify that the scan criteria were met at that bar.
For an overview of the Scan Interface, click here.
Scan Objects, like charts, quote pages, portfolios and other Investor/RT objects have
various properties. These include:
Name
A user specified name up to 31 characters in length containing alphabetic characters and
underscores. Scan names may not contain numeric digits, spaces, or other special
characters.
Source Quote Page
Each scan operates on (scans) the data for each instrument in the designated source quote
page. The quote page that results from a scan operation (the resultant quote page) is
named with the name of the scan. A scan's source quote page may be any system or user
define quote page, or even a quote page produced as the resultant quote page from some
other scan object.
Scan Time frame
The scan request is interpreted according to the user specified time frame (daily, weekly,
monthly, tick, intra-day 1 minute, etc.) Version 2.0 of Investor/RT supports only the
daily time frame.
Scan Elements
Each scan object has one or more scan elements. A scan element is a property of an
instrument (e.g. PE Ratio, 52-week-high), or a bar data value (e.g. high, low, close,
etc.), or a technical indicator calculated from the historical data for each instrument.
Scan Request (Signal)
Each scan object has a scan request composed by the user in the scan request language. The
scan request language (SRL) is a language for stating a logical condition that must be
true for an instrument to be accepted by the scan. Scan requests formulated in the SRL are
expressions composed of scan elements, numbers, and operators as described below.
Scan Request Language Notation
The following is a list of the scan elements that may be selected for use in formulating a
scan request. There are three kinds of scan elements: historical properties, fixed
properties, and technical indicators. Historical properties and technical indicators have
a "current" value and a historical value some number of days (bars) ago. Fixed
properties are properties of an instrument for which Investor/RT has only the
"current" value. Each scan element has a "token", an abbreviated name
used to reference the scan element when writing expressions in the SRL.
Tokens for Historical Properties:
| OP |
the current opening price |
| HI |
the current high price |
| LO |
the current low price |
| CL |
the current or closing price |
| VOL |
the current of closing volume |
| OI |
the current open interest |
| MED |
the current average of high and low price |
| MID |
the current average of high, low, and close |
When the token for a historical scan element is suffixed with one or more digits, the
numeric suffix is interpreted to mean the value of the scan element that number of bars
(days) ago. For example CL5 is a "qualified token" that means the closing price
5 bars (days) ago.
Thus for any number n:
| OPn |
the opening price n bars (days) ago. |
| HIn |
the high price n bars (days) ago. |
| LOn |
the low price n bars (days) ago. |
| CLn |
the closing price n bars (days) ago. |
| VOLn |
the volume n bars (days) ago. |
| OIn |
the open interest n bars (days) ago. |
| MEDn |
the average of high and low price n bars (days) ago. |
| MIDn |
the average of high, low, and close n bars (days) ago. |
Fixed Properties:
| BID |
the current bid price |
| BIDZ |
the current bid size |
| ASK |
the current ask price |
| ASKZ |
the current ask size |
| BAS |
the current bid/ask spread |
| PREV |
the previous day's closing price (equivalent to CL1 but faster) |
| CH |
the current day's change in price from the previous day's close |
| YRHI |
the 52 week high price (available for DTN, BMI, DTN.IQ) |
| YRLO |
the 52 week low price (available for DTN, BMI, DTN.IQ) |
| AVGVOL |
the 20 day average trading volume |
| PE |
the price earnings ratio (available for DTN, BMI, DTN.IQ) |
| EPS |
the earnings per share (available for DTN, BMI) |
| DIV |
the dividend amount (available for DTN, BMI) |
| YLD |
the annual dividend yield (available for DTN, BMI) |
| BETA |
volatility measure (transmitted) |
| GAP |
gap open amount, i.e. opening price minus
previous close. |
| HIALARM |
the user specified high alarm level for the
instrument |
| LOALARM |
the user specified low alarm level for the
instrument |
| VOLALARM |
the user specified volume alarm level |
| BARS |
the number of bars of data available for the
instrument |
| LEN |
the length of the ticker symbol of the
instrument. |
| PCHO |
the percentage change in price from the open |
| PCHY |
the percentage change in price yesterday |
| QTAGE |
the time since the last quote or trade in seconds |
| SECTYPE |
a number indicating the security type of the
instrument: Stock 1, Stock Option 2, Future 3, Spread 4, Future Option 5, Spot 6,
Corporate Bond 7, Government Bond 8, Municipal Bond 9, Fund 10. Statistic 11, Index 12,
Forex 13, Cash 14, Garvin Bond 15, User Defined16 |
| SESSION |
the instruments session number |
| TICKD |
the number of down ticks |
| TICKU |
the number of up ticks |
| TICKS |
the number of ticks |
| XAVGVOL |
ratio of current trading volume to average
trading volume |
| PCHO |
the percentage change in price from the open |
| PCHO |
the percentage change in price from the open |
| PCHO |
the percentage change in price from the open |
| PCHO |
the percentage change in price from the open |
The following thirteen scan tokens can be used to perform
option analysis, i.e. when scanning instruments having security type "Stock
Option" or "Future Option".
| DAYS |
the number of days until expiration on the option |
| IV |
the intrinsic value of the option (the amount the
option is "in the money") |
| TV |
the "time value" of the option, i.e.
the last price minus the intrinsic value of the option |
| STRIKE |
the strike price of the option. |
| THEO |
the calculated theoretical value of the option |
| BETA, DELTA, GAMMA, RHO, THETA, LAMBDA, VEGA |
calculated values of the options
"greeks" |
| IVOLAT |
the implied volatility of the instrument |
The following scan tokens are textual items that can be tested
using the "=" operator in scan requests. Wildcard matching is supported where ?
represents any single character and * represents any string of 0 or more characters. For
example, the scan criterion NAME = "*Put*" would identify any instrument having
the word "Put" in the security name. The scan criterion TICKER =
"????X" would identify all instruments having 5 letter ticker symbols ending
with an X, while TICKER = "??" would identify all instruments with two letter
tickers.
| TICKER |
the instruments ticker symbol |
| ALIAS |
the Dial/Data alias ticker symbol used for
downloading data. |
| NAME |
the security name of the instrument |
| CUSTOM |
the "User Data" text data for the
instrument |
| EXCHR |
the requested exchange of the instrument |
| EXCHT |
the transmitted exchange of the instrument |
70 additional fundamental indicators available from Dial/Data.
Unlike historical scan elements like CL, fixed properties only
have a current value. The tokens for fix properties may not be qualified by a number.
Technical Indicators and associated preferences
| MA |
Moving Average |
| RMA |
Relative Moving Average, equivalent to CL/MA |
| The relative moving average is
identical to the moving average calculation except that the value of the moving average is
divided by the closing price for each bar in the period. Thus the RMA indicator oscillates
above and below 1.0. Values above 1.0 imply that the moving average is above the closing
price and vice versa. This indicator is especially convenient for test whether the price
is above or below the moving average in scan requests. |
| STAT |
Statistics (minimum, maximum, average, or
standard deviation) |
| This indicator can be configured to
calculate the minimum, maximum, average, total or standard deviation of some "price
value" for some specified number of periods. The "price value" may be the
high, low, last, high + low average, or high + low + last average, volume, open interest,
or "range"( high - low). This indicator is used only in scan requests. |
| RSI |
Relative Strength Index |
| MACD |
Moving Average Conv/Div Oscillator value |
| RAWK |
Stochastics rawK value |
| FASTD |
Stochastics fastd value |
| SLOWD |
Stochastics slowd value |
| CCI |
Commodity Channel Index |
| ADX |
Average Directional Index |
| AD |
Accumulation Distribution |
| BOLU |
Bollinger Band (upper band value} |
| BOLD |
Bollinger Band (lower band value) |
| KELTU |
Keltner Band (upper band value) |
| KELTD |
Keltner Band (lower band value) |
| MOM |
Momentum |
| DIPLUS |
+DI Directional Indicator |
| DIMINUS |
-DI Directional Indicator |
| MFI |
Money Flow Index |
| ARMS |
Arms Ease of Movement Index value |
| ROC |
Rate of Change index |
| VMA |
Moving Average of Volume |
| TSI |
True Strength Index |
| AD |
Accumulation/Distribution Index |
| WAD |
Williams Accumulation/Distribution Index |
| WPR |
William %R value |
| EFI |
Elder Force Index |
| UDVRS |
Up/Down Volume Ratio Slope |
Like historical properties, all technical indicators can be qualified by suffixing a
number to the name, e.g. MACD1 means the value of the MACD oscillator yesterday. Note that
the preferences for each technical indicator name are specified elsewhere. The
specification of technical indicator preferences is discussed in the scan user interface
section.
Scan Request Language operators
There are three kinds of operators in the Scan Request Language: logical operators,
relational operators, and arithmetic operators.
Arithmetic operators are addition, subtraction, multiplication, and division, represented
by the operators +, -, *, / and ^ respectively. Arithmetic operators are used to compute
values from scan elements. Some sample arithmetic operations follow:
| (YRHI - CL)*100 /YRHI |
the percent away the close is from the 52-week high |
| (HI-LO) |
the high price minus the low, i.e. the current trading range |
| (MA30 - MA) |
the difference between the moving average 30 days ago and today. The token
MA can represent an term moving average. |
The result of evaluating an arithmetic express is an arithmetic value that can then be
compared to other arithmetic values using relational operators.
Relational Operators
| < |
less than |
| <= |
less than or equal to |
| = |
equal to |
| != |
not equal to |
| > |
greater than |
| >= |
greater than or equal to |
Some sample relational expressions are:
| MA > (MA30 * 1.1) |
The current moving average is more than ten percent higher than it was 30 days
ago. |
| (YRHI - CL)*100 /YRHI < 20 |
The current price is at least 20% off the 52 week high. |
Logical Operators
The result of evaluating a relational expression is true or false. All valid scan requests
can be evaluated as true or false. To formulate more complex scan requests, relational
expressions can be tested in combination with other relational expressions using logical
operators. Logical operators are (1) logical and, (2) logical or, and (3) logical not.
The logical and operator may be written as "AND", "and",
"&," or "&&". The scan request expression "x and
y" is true if and only if expressions x and y are both evaluated as true.
The logical or operator may be written as "OR", "or", "|" or
"||". The scan request expression "x or y" is true if either x or y
are evaluated as true.
The logical not operator may be written as "NOT", "not", or
"!". The scan request expression NOT x is true if and only if the express x is
evaluated as false.
Special Functions
There are several special built-in functions that extend the scan language in useful ways
by performing arithmetic or statistical calculations.
| SQRT(HI-LO) |
The square root of the high low range |
| ABS(CL - CL1} |
The absolute value of the difference of last
price and yesterdays close |
| The SQRT and ABS functions can
operate on arithmetic express of any complexity. |
| MIN(RSI5) |
The minimum value of the RSI indicator during the
5 preceding periods |
| MAX(CL30) |
The maximum closing price for the preceding 30
periods |
| AVG(CCI15) |
The average value of the CCI indicator during the
preceding 15 periods |
| STD(VOL20) |
The standard deviation of volume during the
preceding 20 periods. |
The MIN, MAX, AVG, and STD functions operate on a single token
(not an expression). The token must be one of the technical indicators followed by a
numeric qualifier or it can be one of the historical data elements followed by a numeric
qualifier (OP, HI, LO, CL, VOL, OI). The numeric qualifier specifies the period back from
the current bar to be used in evaluating the statistic function. Notice that AVG(CL30) is
equivalent to using a MA indicator configured for a 30 period simple moving average. The
key property of these statistical functions is that they can operate on a range of
technical indicator values. For example, if you want to test to see if the RSI indicator
has been above 70 at any time during the preceding 4 periods, this condition is expressed
briefly as
MAX(RSI4) > 70
Without the MAX function, this condition could only be
expressed by:
(RSI > 70 or RSI1>70 or RSI2>70 or RSI3>70 or RSI4 > 70)
Numbers
Any string of consecutive digits, with or without a decimal point, can be used in a scan
request for arithmetic calculations and in relational comparisons. Numbers prefixed with a
minus sign are interpreted as negative numbers. Numbers suffixed with the lower case
letter k or m are multiplied by a thousand or a million respectively, e.g. VOL > 3.2m
is equivalent to VOL > 3200000. Note that numbers may not contain commas.
Parentheses and other Punctuation
The Scan Request Language supports expressions of arbitrary
complexity. Parentheses may be used to enclose any expression to improve readability and
to assure the correct interpretation of the scan request. If you wish to insert a comment
into the scan request, terminate the scan request with a semicolon. Any characters entered
to the right of the semicolon are treated by Investor/RT as commentary.
Scan User Interface
Scan objects may be viewed, modified, or created in Investor/RT using the Scan Setup
window. To access the Scan Setup window, click the Scan icon on the main toolbar. A list
of existing scan objects will appear. Choose the one you wish to work with and press OK or
choose New and click OK to bring up an empty Scan Setup window for defining a new scan. A
pop up list button at the top left of the window provides quick access to any previously
saved scan objects. Choose "New Scan Definition" for this list at any time to
start a new scan request.
Defining Scan Objects.
The first step in defining a scan is to choose the scan elements you wish to use in the
scan request. A list of available scan elements appears on the left side of the window in
a scrollable list. Double-click items in this list and they will appear in the scan
element spreadsheet on the right side of the window. When you choose a technical indicator
scan element, you will first be prompted to set the preferences for the technical
indicator chosen. When a technical indicator has been chosen the preferences for the
technical indicator are shown in the scan element spreadsheet on the right.
The preferences for any technical indicator scan element may be adjusted at any time by
double-clicking on the technical indicator name in the scan element spreadsheet. A
technical indicator may be chosen more than once from the list on the left, each time with
a different set of preferences. If you do this, be sure to assign each indicator a unique
name by editing the name in the scan element spreadsheet. For example, you could add the
MA moving average technical indicator twice, once with a 100 day period, and once with a
25 day period. To distinguish between the two moving averages in the scan request
language, adjust the names to say, MAa and MAb. Note that the adjusted scan element name
must be composed of alphabetic characters or the underscore character and may be up to 31
characters in length.
The second step is the write the scan definition. Names, operators and parentheses may be
entered by clicking the mouse on the various buttons arrayed above the scan request entry
box. Clicking on a scan element name in the spreadsheet causes a button to appear with
that name. Clicking that button inserts the scan element name into the entry box for you.
If you prefer you can type in the request manually. Note that scan element names are case
sensitive and must be entered exactly as listed in the scan element spreadsheet on the
right.
The scan entry area is large enough to accommodate a very lengthy request or some
commentary about the request. The scan request entry box can accept up to 500 characters
of text. If you wish to insert a comment into the scan request, terminate the scan request
with a semicolon. Any text entered after the semicolon is treated by Investor/RT as
commentary and is saved with the scan request for future reference. For example, a scan
request entry box may read:
HI4
Press the "Check" button and Investor/RT will analyze the scan request, report
any errors it finds or display the message "Scan request is okay" in the main
toolbar message area.
Set the source quote page for the scan by pressing the QP button in the lower left corner
of the Scan Setup window. A list of available quote pages appears. Pick the one you want
and press OK. The selected quote page defines the list of instruments to be scanned. Set
the time frame for the scan using the pop up list button in the upper right.
To save the scan object in the database, press the Save button. If the scan request is a
new one, you will be asked to provide a name for the scan. Scan names must be alphabetic.
If you enter spaces in the name, they will automatically be changed to underscores. The
newly saved scan object is added to the Objects menu in the Scans sub menu.
To run the scan, press the Run button. Investor/RT checks the scan request and, if no
errors are found, it begins examining the data for each instrument in the source quote
page according to the scan request. The message area of the main toolbar will keep you
informed of that progress of the scan.
When the scan completes, if any instruments were found a quote page will appear showing
the list of instruments that "passed" the scan request. Sometimes, instruments
are encountered during the scan that have insufficient historical data on file to evaluate
the scan request. If that is the case, a message box will appear stating the number of
rejections that were based on insufficient data.
The resultant quote page will have the same name as the scan object. The quote page will
be automatically formatted to show the scan elements and the results of the calculations
performed during the scan request for each instrument. The resultant quote page is like
any other quote page. You may save it for future reference, use it to perform a slide show
on the list of instruments; you can even use the resultant quote page as the source quote
page for another scan object.
The resultant quote page will sometimes have one or more "dynamic columns" of
data that list values of technical indicators, arithmetic calculations, and historical bar
data items. For example, the request
HI4
will list columns labeled HI4, HI3, HI2 and HI1 showing the high prices for each
instrument for the previous 4 days. These "dynamic columns" are created "on
the fly" by Investor/RT whenever a scan is run. When you run another scan, the
dynamic columns are reassigned according to the new scan request. Please keep this in
mind. The dynamic columns that appear in a scan result quote page are valid only until the
next scan is run.
Performance Issues.
A scan request can take a few seconds or several minutes, depending on the nature of the
scan request and the number of instruments in the source quote page. Scan requests that
use only fixed properties and unqualified current price scan elements run in a second or
so because they make no reference to historical pricing data. Scan requests that contain
technical indicators or qualified historical data references take considerably longer. The
order of the comparisons in a scan request can also affect the time it takes to execute
the request. for example, consider these two equivalent requests:
CL <= 50 and MA5 < MA MA5
where MA represents a 100-period simply moving average technical indicator. The first
request will run faster since it can reject instruments with current prices over $50
without having to calculate the moving average. The second request always calculates the
moving average first and then rejects those instruments that pass the moving average test
that are over $50.
If you wish to see Investor/RT's analysis of the scan request and the calculation order
for the scan request, click the "Check" button in the Scan Setup window. Then
choose File:Open:Message Log. The message log will show the details of the scan requests
and the calculation order to be used when the scan is run.
Miscellaneous.
Two special technical indicators, "Relative Moving Average" (RMA) and
"Statistics" (STAT) have been added to Investor/RT to provide useful technical
calculations for use in formulating scan requests. The RMA indicator is configured just
like the moving average (MA) technical indicator but the values for each bar (day) are
divided by the closing price for that bar. A value of 1.0 indicates that the closing price
was the same as the moving average on that day. Values greater than 1 indicate the price
was about the moving average and by how much, e.g. 1.11 means the price was 11% above the
moving average. Similarly values below 1 indicate the price is below the moving average,
e.g. .94 means the price is 6% below the MA. The expression
RMA1 <1 and RMA> 1.03
would identify issues whose closing price in the current trading session move up through
the moving average and now exceed the moving average by at least 3%.
The "Statistics" function allows reference to five simple but useful statistical
measures: maximum, minimum, total, average, and standard deviation. When the STAT
technical indicator is chosen from the list of functions, the preferences window appears
in which you may specify which statistical value you want, the period, and which price
value to use. After specifying the preferences, the new scan element will appear in the
scan element spreadhsheet with the name STAT. The preferences column will show what the
calcuation is. Typically, you would change the name STAT to a meaningful name, like MAX,
MIN, STDDEV, etc. Using the STAT function you can easily include measures like the highest
high in the last 250 periods. For data services that do not transmit a 52 week high value,
this provide the value by inspecting the historical data. The standard deviation can
useful in ranking the volatility of issues. Define STDDEV as the standard deviation
statistics on the closing price with a period of say, 100. The use a scan request such as:
STDDEV/CL > 0
This will result is a quote page with data columns containing standard deviation, closing
price, and the ratio of standard deviation and the close. Then sort the issues in the
quote in ascending or descending sequence by the ratio to rank the list by a simple price
volatility measure.
As special instrument property, called BARS, may also be used in scan requests. The value
of this property for any instrument is the number of bars (days) that are stored on the
database for the instrument. Thus the scan request expression
BARS <50
will scan for any instrument have less than 50 days of historical data on file. |