tokens

CTX RTL token

RTL context (scan, backtest, optimization

RTL Tokens

Tokens are used with Investor/RT's Real Time Language(RTL) to access different types of data or True/False Conditions. You can use the search box below to search directly for a token name (if you know it already) or by a characteristic that you are looking for. Examples searches might be "Range" or "Volume" to reveal tokens related to those keywords. Tokens are also categorized into "Token Types" so that you can search by "Type." The list of Token Types include: Fundamental, Historical, Primitive, Technical Indicators, Alarm Flags, Monitoring Flags, Constants, Arithmetic, Relational and Logical. Tokens that relate specifically to trading typically have the prefix TR_. For example TR_FILL is the most recent fill price when in a position. For a full list of all trading related functions, see the article Trading Related Tokens. See also RTL Function Tokens for a list of all functions built-in to the RTL lanuage.

YRCL Token (Prior Year Closing Price)

The token YRCL has been added to RTL to provide a means to scan on the year-to-date percentage change in price. Use the RTL expression:

((CL - YRCL)/YRCL)*100

to calculate the year-to-date percentage change. (10.5 means 10.5%). At present, the prior year's closing price is a data value transmitted only over the DTN data service. The close price of an issue on Dec. 31, 1999 is usually available in the historical record on the database. See item 16. below for a new technique for recording the prior year closing price using a scan.

DV Token for Testing Date/Time Specific Values

The RTL DV token allows you to refer to a price point at some time in the past using a specific date/time. For example, suppose you are running a scan and wish to compare the current closing price with the price of the issue at the close of last year. Simply add the token DV to your scan token list. A dialog box will appear in which you specify the date as 12/31/99 and the price point as "Close". Then use DV in your scan formula to refer to the 12/31/99 closing price. For example, try this scan:

CL/DV > 1.2; scan for issues up 20% of more this year

DAYM and MONTH RTL tokens

These tokens allow you to test for the day of the month (DAYM) or the month of the year (MONTH) in scans, signals, and custom indicators. DAYM evaluates to the day number in the range 1 to 31. MONTH yields a value 1 to 12. The DAY token yields a number 0 to 6 representing the day of the week (0 = Sunday, 1 = Monday, etc.).

Trading Related Tokens

Tokens are available in RTL to provide access to brokerage position and working order information when using the trading order features of Investor/RT. When trading orders are sent, Investor/RT will monitor the status of those trading orders and when Investor/RT receives a fill notification, it will record the status of the user's position.

Quotepage columns tokens

Four bid/ask related quotepage columns with corresponding RTL tokens are available:

  • Bid Tick Count (RTL: BTICK)
  • Ask Tick Count (RTL: ATICK)
  • Bid Volume (RTL: BVOL)
  • Ask Volume (RTL: AVOL)

These market data items update in real-time as trades are received for the instruments you are tracking:

AV token

The indicator token AV in the RTL language enables time-stamped historical values to be saved in the Investor/RT database for any ticker symbol. Just as User V# variables provide a means of saving a single computed value for a ticker symbol, the AV token can be used to save a historical array of values, one value for each bar backtested. The AV token is a historical token, thus it has values for each bar; previous bar values can be referenced in an RTL formula with a bar qualifier (AV.1, AV.2, etc.). A value can be set for a bar using the SET function, e.g.

Tokens - SET statement

The SET command is used to set a variety of instrument/symbol properties. The format for setting a property in a scan, signal, or custom indicator, is:

SET(property, value)

The SET statement is commonly used in a scan to set the properties on all the symbols in the scans target (input) quotepage. SET is also used in trading system signals to manage targets and stops. The resulting "value" of the SET statement in the context of the scan, signal, or custom indicator, is TRUE (or 1 numerically). To reverse this meaning (to False or "0"), just use !SET

Formula Tokens

Below is a list of the tokens used in the Technical Indicator Formulas, along with a description of what these tokens represent.

Pages