Navigation: Examples and Tutorials >

Tutorial 3 - Simple Scan

 

 

 

 

To start the third tutorial, close any child windows that remain open, then open the script called import_yahoo.rts in the Examples folder (see the previous tutorial for instructions on how to do that).

This example script contains only an Import section.

Click on  to run the script and import data for each current (as of June 2022) stock in the S&P 500 index, along with the SPY ETF data, from 2015 through today. (Feel free to edit the SP500.txt file if the components have changed, or even better, use Norgate Data instead of Yahoo to automatically gain access to both current and historical index members.)

You will see that the Yahoo import runs fairly quickly. This is because RealTest creates multiple threads for the import, each with a separate HTTP connection to the Yahoo servers.

When the import has finished, close this script window and open the example script called sample_scan.rts.

This script introduces two new sections: Data and Scan.

The Data section is probably the most important feature of RealTest. Please take a moment to read about the Data Section before continuing.

Did that make sense? Good. Now please take a moment to read about the Scan Section as well.

Now we are ready to simply run this scan.

Press the  button and the scan output will appear:

In this example, we are scanning only the most recent date in the data for stocks that are currently down at least 25% from their 126-day (half-year) highest close.

At the time of this writing, 38 stocks met this condition.

Now double-click on the first row to open a chart for that stock with that date as its right-most bar:

Once the chart window is open, you can use the down arrow key on your keyboard to cycle through all the charts from the scan output (or press up to go back to the previous one). Notice that the scan window automatically highlights the line corresponding to the current chart symbol. To see both at once, just move and resize the two windows as desired.

To see other things that can be done with scan output, open the Scan Menu either from the menu bar (when the scan is the active window) or by right-clicking within the scan window:

The entire contents of the scan can be copied to the clipboard (from which it will paste into Excel with columns preserved) or saved as a CSV file.

There is also a SaveScanAs option in the Settings section, which, if specified, causes the scan output to be automatically saved every time the scan is run. This can be useful for something like producing a daily trading candidate list.

That's the end of this third tutorial!

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC