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: no security definition

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

    Multi-instrument: no security definition

    Hello,

    I use IB and NT 6.5.1000.15


    In a multi-instrument strategy, I can use as primary instrument/secondary instrument:

    NG 05-10/ES 06-10 => OK
    NG 06-10/ES 06-10 => OK
    ES 06-10/ES 09-10 => OK
    NG 05-10/NG 06-10 => got the following error message:

    ‘Error in requesting historical data from IB: No security definition has been found for the request(200)’


    In the Instrument Manager>Instrument Editor NG for IB is defined as ‘NG’.


    Do you know how to fix this up? Thanks.

    #2
    Hello betcashrun,

    Thank you for your post.

    Please make sure you are running the correct version of TraderWorkStation. Can download at the link below:


    You can reset instruments using the procedure below.
    To reset your instruments please: go to the Tools menu, select the Options menu item, select the Misc tab, and then click on 'Reset Instruments'.

    Verify that you're able to receive data for both symbols when used outside of a strategy.

    Let us know if this doesn't address the issue.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply, Ryan.

      I’ve still got the issue after having reset the instruments and having downloaded the last version of TWS. In a chart, I can have NG 06-10 or NG 05-10 with 7 days of 1 min data. If I add a strategy with NG 06-10/NG 05-10 or NG 05-10/NG 06-10, I get the same error message.

      I reproduced the problem with this simple strategy:
      Code:
        [COLOR=blue][FONT=&quot]#region[/FONT][/COLOR][COLOR=black][FONT=&quot] Using declarations[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System.ComponentModel;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System.Diagnostics;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System.Drawing;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System.Drawing.Drawing2D;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] System.Xml.Serialization;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Cbi;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Data;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Indicator;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Gui.Chart;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]using[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Strategy;[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]#endregion[/FONT][/COLOR]
        
        [COLOR=green][FONT=&quot]// This namespace holds all strategies and is required. Do not change it.[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]namespace[/FONT][/COLOR][COLOR=black][FONT=&quot] NinjaTrader.Strategy[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]{[/FONT][/COLOR]
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=gray][FONT=&quot]<summary>[/FONT][/COLOR]
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=green][FONT=&quot] Enter the description of your strategy here[/FONT][/COLOR]
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=gray][FONT=&quot]</summary>[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]    [Description([/FONT][/COLOR][COLOR=maroon][FONT=&quot]"Enter the description of your strategy here"[/FONT][/COLOR][COLOR=black][FONT=&quot])][/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]public[/FONT][/COLOR][COLOR=blue][FONT=&quot]class[/FONT][/COLOR][COLOR=black][FONT=&quot] MyCustomStrategy : Strategy[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]    {[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]#region[/FONT][/COLOR][COLOR=black][FONT=&quot] Variables[/FONT][/COLOR]
        [COLOR=green][FONT=&quot]// Wizard generated variables[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]private[/FONT][/COLOR][COLOR=blue][FONT=&quot]int[/FONT][/COLOR][COLOR=black][FONT=&quot] myInput0 = [/FONT][/COLOR][COLOR=purple][FONT=&quot]1[/FONT][/COLOR][COLOR=black][FONT=&quot]; [/FONT][/COLOR][COLOR=green][FONT=&quot]// Default setting for MyInput0[/FONT][/COLOR]
        [COLOR=green][FONT=&quot]// User defined variables (add any user defined variables below)[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]#endregion[/FONT][/COLOR]
        
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=gray][FONT=&quot]<summary>[/FONT][/COLOR]
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=green][FONT=&quot] This method is used to configure the strategy and is called once before any strategy method is called.[/FONT][/COLOR]
        [COLOR=gray][FONT=&quot]///[/FONT][/COLOR][COLOR=gray][FONT=&quot]</summary>[/FONT][/COLOR]
        [COLOR=blue][FONT=&quot]protected[/FONT][/COLOR][COLOR=blue][FONT=&quot]override[/FONT][/COLOR][COLOR=blue][FONT=&quot]void[/FONT][/COLOR][COLOR=black][FONT=&quot] Initialize()[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]        {[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]           [B] Add([/B][/FONT][/COLOR][B][COLOR=maroon][FONT=&quot]"NG 06-10"[/FONT][/COLOR][COLOR=black][FONT=&quot],PeriodType.Minute,[/FONT][/COLOR][COLOR=purple][FONT=&quot]1[/FONT][/COLOR][COLOR=black][FONT=&quot]);[/FONT][/COLOR][/B]
        [COLOR=black][FONT=&quot]            CalculateOnBarClose = [/FONT][/COLOR][COLOR=blue][FONT=&quot]true[/FONT][/COLOR][COLOR=black][FONT=&quot];[/FONT][/COLOR]
        [COLOR=black][FONT=&quot]        }[/FONT][/COLOR]
      ...

      Comment


        #4
        Thanks for sharing those details. I was able to reproduce this on version 6.5

        When I tried in NinjaTrader 7 it didn't produce the error message. Please send an email to [email protected] for the beta download. Reference this thread in the email to sales:


        Test it and let us know if it's still not working as expected.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your reply, Ryan. My email was sent. And I already got a reply from NT Customer Service. As a result, I will test your next beta update.

          Comment


            #6
            Ok it's working now on NT 7.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cre8able, Today, 03:20 PM
            1 response
            9 views
            0 likes
            Last Post cre8able  
            Started by fiddich, Today, 05:25 PM
            0 responses
            3 views
            0 likes
            Last Post fiddich
            by fiddich
             
            Started by gemify, 11-11-2022, 11:52 AM
            6 responses
            804 views
            2 likes
            Last Post ultls
            by ultls
             
            Started by ScottWalsh, Today, 04:52 PM
            0 responses
            4 views
            0 likes
            Last Post ScottWalsh  
            Started by ScottWalsh, Today, 04:29 PM
            0 responses
            7 views
            0 likes
            Last Post ScottWalsh  
            Working...
            X