|
This is the most typical type of scan and is simply called "Scan" in RealTest.
See Tutorial 3 for a complete example of a data scan.
To run a data scan, you must first import or load a data file, then open or create a script that includes a Scan section.
If the currently active script includes a Scan section, then the Scan button on the Tool Bar (and the Scan item on the Run Menu) will be enabled. Pressing it will run the script in Scan Mode.
As with all run modes, Scan first applies your settings from the Settings Panel, then applies the Settings script section if specified (overriding any panel settings), then applies the Scan Settings section if specified (overriding panel and script settings). The scan is then run by looping over all symbols and all dates using the BarSize setting.
If the Scan section includes a Filter formula, that is evaluated first for each bar of each symbol. If the Filter cannot be evaluated (nan) or returns False (0) then that bar is excluded from the scan output and the remaining formulas are not evaluated for it.
All other formulas defined in the Scan section are then evaluated and their results are added to the output.
The default output of a Data Scan is a Scan Window containing a row for every bar that was not filtered and a column for every named formula in your Scan section definition, preceded by the standard Date and Symbol columns.
Scan definitions can optionally include a Sort item to specify the initial sort order of the rows. This special item is not a formula like all other Scan items. Rather, it is a comma-separated list of column names. Precede a name with a minus sign to sort by that column in descending order.
The following choices can optionally be specified in Settings or ScanSettings to change the default behavior of scans:
•ScanNoDefCols - suppress the output of the Date and Symbol columns
•SaveScanAs - write the output to a CSV file as well as displaying it in a window
•ScanNoWindow - do not display the scan in a window (requires SaveScanAs)
•ScanNoHeader - omit the column name header row from the SaveScanAs CSV output file
|