Navigation: Realtest Script Language > Syntax Element Details >







Stock/Contract Information


Numeric code for the symbol of the current security


The value returned is the alphabetical ordinal number of the symbol in the currently loaded DataFile.

You don't need to know the actual number to use it. Use Symbol Constants like $MSFT to compare specific symbols to the value of this variable.

See also ?Symbol, which returns the current symbol as a string, and SymNum, which allows dynamic symbol lookup.

?Symbol = "MSFT" and Symbol = $MSFT would both accomplish the same purpose, but it is slightly more efficient to use symbol constants.

Symbol constants also have the advantage of smart auto-complete when entering them.




Copyright © 2020-2024 Systematic Solutions, LLC