Announcement

Collapse
No announcement yet.

comparison symbols

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • comparison symbols

    I am trying to creat an EFS study that will apply an equasion to the main chart symbol and the comparison symbol that is loaded on that page. How do I differentiate between the main symbol and the comparison symbol???

    Thanks,

    John

  • #2
    Hello John,

    To access the prices of a symbol external to the chart's symbol, use the sym() function. Most of the EFS Series functions have an optional sym() | inv() parameter. This is where you would use the sym() function. Just pass the external symbol to sym() as a string. For example, the following will retrieve the last price for IBM.

    var nIBM = close(0, sym("IBM"));

    The series functions will refer to the chart's symbol unless you specify an external symbol with the sym() function. To retrieve the last price for the chart symbol,

    var nMySymbol = close(0);

    Then you can use the variables in math equation.

    var myResult = nMySymbol - nIBM;

    myResult would then contain a number that is the result of the current chart symbol's price minus the price of IBM.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment

    Working...
    X