Announcement

Collapse
No announcement yet.

Multi-symbol strategy

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

  • Multi-symbol strategy

    I have a strategy that is based on one
    symbol, e. g., Dow Index. When the buy
    /sell signal is generated from the Dow
    Index chart/EFS script, I like to place buy/sell order
    for another symbol, say,
    IBM that is not on the chart.

    Is there such EFS function that would
    let me do this ? i. e., place a long/short
    order for a different symbol (and maybe
    even different time frame) ?
    The Strategy.doLong() or doShort()
    function can not accept any symbol
    as a parameter.

    Thanks for your help.

  • #2
    redsignal,

    Use the"Broker Functions" for your executions.

    Here is an example:

    PHP Code:
    if (MyStrat == true)}
    buyMarket"IBM"100 );
    }

    if (
    MyStrat == false)}
       
    sellMarket"IBM"100 ); 

    Excellent book on JavaScript for beginners

    Comment


    • #3
      Thanks for your help.

      However, using broker functions means
      when I run the strategy with the backtester, the trade results will not
      be available for analysis.

      Comment


      • #4
        redsignal,

        Just use the "sym" function when writing your conditional statements. This will draw the criteria from the symbol you want to trigger your buy/sells. So if, you want to buy IBM based on triggers from $INDU. Set up you criteria using the "sym" function and load the efs on a IBM chart.
        You can back test using the "Strategy object" this way.
        Excellent book on JavaScript for beginners

        Comment


        • #5
          This idea of using sym() works.

          Thanks.

          Comment

          Working...
          X