Home                           

 Try Investor/RT             

 Investor/RT Tour           

 Getting Started              

 What's New                  

 Testimonials                 

  Q&A - Broken down by Topic . . .      Complete List of Questions - All Topics
     Charts and Technical Indicators      TPO Charts
     RTL: Scans, Signals, and Custom Indicators      Importing and Exporting
     Trading Systems and Backtesting      Schedules
     Quotepages, Portfolios and Custom Columns      Alarms / Alerts
     Data: Historical Data, the Database, and Data Services      User Variables (T# and V#)
     Custom Instruments: Spreads and Pairs      General / Miscellaneous
     Controls, Windows, and the Button Indicator      Autotrading
     Slide Shows      Product Line

 
Q&A Home

Investor/RT Answer
Answers to Common Questions

   

Question

I've got a large quotepage of stocks I monitor.  I would like to run a scan periodically (every 15 seconds) to record the difference between the current daily volume and the volume the last time I ran the scan (15 seconds back), and record these values historically so I can run moving averages and other indicators on them.  Is there any way to do this?
   

Answer

First, for each of the symbols in your quotepage, you need to create an associated ticker symbol with format:

TICKER(V#1)

You can replace V#1 with any V# variable you like, and TICKER is just replaced with the underlying ticker symbol.  For instance, MSFT would have an associated ticker symbol of MSFT(V#1).

For a large group of ticker symbols, I recommend you export your list of tickers and open in a spreadsheet program like excel, where you can quickly convert to the new ticker format, (append the V#1), and then import as a group of new ticker symbols into a new quotepage.  In excel, you can do so quickly with syntax similar to the following:

=CONCATENATE(A1,"(V#1)")

You can quickly import the ticker symbols by first making a new quotepage in IRT, then selecting all the V#1 tickers in excel, and copying them (Ctrl-C).  In IRT, click the "Ticker" column heading and then paste "Ctrl-V".  All the V#1 symbols should appear in the new quotepage.

Now, any scan with the syntax:

SET(V#1, whatever)

on the quotepage of the original underlying symbols (the actual stocks) will in turn generate a tick on the associated V#1.  So, right at the session open, you I would initialize both the V#1 values and V#1 ticker symbols with:

SET(V#1, 0) AND SET(V#2, 0)

The V#2 will be used to store the volume at the last scan.  This scan should be run on daily data for our purposes.  Now, schedule a scan to run every 15 seconds (or however often you wish) with the syntax:

SET(V#1, VO - V#2) AND SET(V#2, VO);

This will generate a tick on our V#1 ticker symbols at a value equal to the difference between the current volume and the volume at the last scan, and then set V#2 to the current volume so it will be ready for the next scan.

You can then run open a tick chart on any of the V#1 ticker symbols, or run a scan on the V#1 ticker symbol quotepage, using moving averages, statistics, etc.