Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-instrument strategy

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

    Multi-instrument strategy

    Hi,

    This is still part of my on-going conversion from 6.5 to NT 7.

    I "Add()" multiple instruments within my code... somewhere between 6-10. A few problems:

    - When I expand the strategy view (which should be showing position/performance for each instrument)... I only see some of the instruments. In fact, I only show 2 of the instruments I've added. I don't *need* this to work, but I'm wondering if this is indicating of some kind of a problem during strategy startup. Looking at the output messages from my code, it seems like the other instruments have been added.

    - The more important issue: "Historical" doesn't seem to be working correctly. I added this line to my OnBarUpdate():

    Print("Current time: " + Time[0] + ", historical is: " + Historical);

    And every 5 minutes (I run with 5m bars), I'm seeing this in output:

    Current time: 5/23/2011 9:35:00 AM, historical is: True

    #2
    Ah, I wonder if it's because of this:

    Tips
    1. When using this property in a strategy that is running with "Wait until flat before executing live", the property will return "true" until the strategy reaches a flat state and switches to live executions.

    I'll try and let you know.

    Comment


      #3
      Originally posted by heech View Post
      Ah, I wonder if it's because of this:

      Tips
      1. When using this property in a strategy that is running with "Wait until flat before executing live", the property will return "true" until the strategy reaches a flat state and switches to live executions.

      I'll try and let you know.
      Yep, that was the issue. I deselected that, and the problem went away... but a new problem came in.

      Now, it appears historical bars are coming in with Historical set to FALSE! Same code as above, with a Print inside OnBarUpdate():

      Current time: 5/17/2011 5:30:00 PM, historical is: False

      Comment


        #4
        Hi Heech,

        Yes, you should generally expect to see added series listed on the strategies tab. I would make sure you are using the most recent compiled version of your strategy by compiling, removing and adding back.

        Glad you were able to identify the reason for seeing Historical returned as true for real time bars. Thanks for following up.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Ryan,

          My last post might have been a little confusing if you didn't read all the way through...

          Actual HISTORICAL bars (at least for all of the secondary instruments) are now coming across with Historical set to FALSE! That's also not correct.

          (This *might* be related to the fact that my primary instrument, ES ##-##, isn't loading a chart correctly...)

          Comment


            #6
            Thanks, Heech.

            Not sure what you are seeing exactly. Can you please share the script and any other details needed to see this on my side?
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Hi there,

              Just to follow up, there was something wrong with the historical data for my primary instrument (ES 06-11). The data was there (as per historical data manager), but I was unable to open a chart for it. So... something internal was definitely goofy.

              I was told to uninstall/reinstall NT7. On the reinstall, I gave up doing a migration. After the new fresh install, everything worked as expected... including Historical on the secondary instruments.

              Comment


                #8
                That's good to hear, Heech. Thanks again.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by arvidvanstaey, Today, 02:19 PM
                4 responses
                11 views
                0 likes
                Last Post arvidvanstaey  
                Started by samish18, 04-17-2024, 08:57 AM
                16 responses
                58 views
                0 likes
                Last Post samish18  
                Started by jordanq2, Today, 03:10 PM
                2 responses
                9 views
                0 likes
                Last Post jordanq2  
                Started by traderqz, Today, 12:06 AM
                10 responses
                18 views
                0 likes
                Last Post traderqz  
                Started by algospoke, 04-17-2024, 06:40 PM
                5 responses
                47 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X