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

Request() Error

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

    Request() Error

    Hi, I'm getting the following error upon doing a Request():

    Error on requesting bars series: 'Unable to load historical data: unknown instrument 'GE 08-16''

    I requested data for an instrument that exists in the MasterInstrument RolloverCollection (by looping through), but for which there is no actual instrument yet, and no historical data.

    1) Is there a way to check if there's an instrument or data before making the request?

    2) If not, what's the right way to handle this error correctly?

    #2
    Hello,

    I am unsure of any way to check if a Future contract or instrument in general has data prior to requesting data for it like this.

    You could certainly check if the instrument exists in the instrument manager, but in the case it does already exist like your futures example where it is a futures instrument and future contract date, in this case I would not know of any way to check the data.

    You could potentially check if the physical folder exists on the filesystem for the instruments historical data, but this would only be helpful in finding instruments you have already downloaded. In the case you had not downloaded data for the instrument but it was available this would not be useful.

    Regarding a solution, in general this is not a documented or supported approach for adding instruments, being that you are looping through a collection which may or may not apply to your data connection I.E. there may be instruments in this collection you do not get data for or are not entitled for, I would not really have a specific solution to provide.

    Instead I could only suggest to better filter the results from your loop to only include dates/instruments that you know should exist or want to trade rather than looping through the entire list which you may or may not work.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Makes sense, especially for complex expiry structures, like GE with monthlies out a quarter or two and then quarterly thereafter. I can see that NT might create all months in the RolloverCollection that will have data eventually, even if they don't now.

      It's then either up to the user to filter for those months that should have data...or perhaps NT could implement the logic and populate the RolloverCollection accordingly...? It may be a bit of an ask, but NT already owns/manages lots of of contract characteristic data (hours, markets, etc.).

      Is there a process to make such a request?

      Comment


        #4
        Hello,

        Certainly, anytime you feel there is room for improvement please feel free to post a feature request.

        I have submitted this as a feature request for development to further review.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cls71, Today, 04:45 AM
        0 responses
        1 view
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        213 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        544 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        12 views
        0 likes
        Last Post XXtrader  
        Working...
        X