Announcement

Collapse
No announcement yet.

Accessing second symbol on chart

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

  • Accessing second symbol on chart

    I have a chart with two symbols on it (second one added by right-clicking on the chart and clicking "insert symbol")

    I am trying to write a formula that compares the two symbols. As far as i can tell this is impossible because there is no way to get the name of the second symbol. The function getSymbol() only returns the first symbol.

  • #2
    Use the sym() function to get the secondary data series you're interested in.

    Comment


    • #3
      Sym

      sym() function takes a symbol name as a parameter. How do i get the name of the secondary symbol?

      Comment


      • #4
        The function call you want doesn't exist.

        So you create a FunctionParameter object in your preMain() so that you can manually tell your script what that secondary symbol name is and then you use the sym() function to pull that secondary symbol's price data series into it ("it" => your script).
        Last edited by SteveH; 04-20-2011, 06:48 PM.

        Comment

        Working...
        X