Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Multi instrument future strategy

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

    Multi instrument future strategy

    I have developed a strategy that works on multiple instruments through the command Add("AXP",PeriodType.Day,1) for a stock and Add("ZR",PeriodType.Day,1) for a future.
    The strategy works fine for the stock, but I get the error message that the strategy has "called the Add() method with an invalid instrument. Either 'ZR' does not exist in the instrument manager or the specified exchange has not been configured"

    I do not understand the error message, as ZR does exist in the Instrument Manager and the strategy works fine if I load it on a ZR bar chart, so I assume Globex is configured OK.
    Can you explain how to resolve this issue?

    #2
    Originally posted by PaulZ View Post
    I have developed a strategy that works on multiple instruments through the command Add("AXP",PeriodType.Day,1) for a stock and Add("ZR",PeriodType.Day,1) for a future.
    The strategy works fine for the stock, but I get the error message that the strategy has "called the Add() method with an invalid instrument. Either 'ZR' does not exist in the instrument manager or the specified exchange has not been configured"

    I do not understand the error message, as ZR does exist in the Instrument Manager and the strategy works fine if I load it on a ZR bar chart, so I assume Globex is configured OK.
    Can you explain how to resolve this issue?
    I don't have ZR, but futures carry an expiration date of the contract.

    For the e-mini ES - you would do like this:

    Add ( "ES 09-15" , PeriodType.Day, 1)

    ZR probably is the same. Please note some futures are quarterly expiration (ES) and some are monthly (CL). So adjust accordingly.

    Comment


      #3
      Hello Paulz,

      Thanks for your post.

      Sledge is correct, futures instrument do require the month/year expiry.
      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by reynoldsn, Today, 09:01 AM
      2 responses
      7 views
      0 likes
      Last Post reynoldsn  
      Started by dcriador, Yesterday, 08:56 AM
      2 responses
      23 views
      0 likes
      Last Post dcriador  
      Started by Haiasi, Today, 09:16 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Atlant, Today, 09:23 AM
      0 responses
      3 views
      0 likes
      Last Post Atlant
      by Atlant
       
      Started by iplaymuzik, Today, 09:13 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Erick  
      Working...
      X