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 Skifree, Today, 03:41 AM
      1 response
      4 views
      0 likes
      Last Post Skifree
      by Skifree
       
      Started by usazencort, Today, 01:16 AM
      0 responses
      1 view
      0 likes
      Last Post usazencort  
      Started by kaywai, 09-01-2023, 08:44 PM
      5 responses
      603 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by xiinteractive, 04-09-2024, 08:08 AM
      6 responses
      23 views
      0 likes
      Last Post xiinteractive  
      Started by Pattontje, Yesterday, 02:10 PM
      2 responses
      23 views
      0 likes
      Last Post Pattontje  
      Working...
      X