Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not getting live bars..

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

    Not getting live bars..

    Hi,

    I'm trying something new... trading futures for the first time with my strategy.

    I've set everything up exactly the way I usually do (for US equities). I'm using symbol NG 07-09. I add two bars: 5 minutes and 30 minutes in my init code.

    I have two datafeeds: IQFeed (with NYMEX enabled), and also ZenFire. When I run everything historically, everything looks perfect. I have added a simple print out in my OnBarUpdate(), and I can confirm I get every bar.

    But *after* I start my strategy... nothing. I'm just not getting any bars. The print at the top of OnBarUpdate() just is'nt getting hit.

    I must be missing something obvious... but I don't know what. Any suggestions?

    #2
    Just a few more data points:

    - if I open up a chart, I see bars coming in and filling.
    - if I run my strategy (from the strategies' tab)... just not getting any new bars in my code.

    Comment


      #3
      Well for one, is live data actually coming in?
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Please switch over to a very basic indicator/strategy that only prints timestamps with no other logic. Does it work then?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Well for one, is live data actually coming in?
          I assume you posted this before my second post. As I said, live chart is showing up great.

          I've just setup this dummy strategy... and it's got the same behavior. I get prints on historical bars, but no more once the strategy starts running.

          /// <summary>
          /// This method is used to configure the strategy and is called once before any strategy method is called.
          /// </summary>
          protected override void Initialize()
          {
          CalculateOnBarClose = true;
          Add("NG 07-09", PeriodType.Minute, 1);
          Add("NG 07-09", PeriodType.Minute, 5);
          }

          /// <summary>
          /// Called on each bar update event (incoming tick)
          /// </summary>
          protected override void OnBarUpdate()
          {
          Print("instrument: " + Instrument.FullName + ", time: " + Time[0]);
          }

          It must be the way I have account connections setup on here... that's the only explanation. But I don't know how. I've tried this dummy strategy with Sim101 (using IQFeed) and my Mirus live account.

          Comment


            #6
            Remove the extra bars and try again. Please also try with just one connection. You should connect to the data provider you want to receive data from for that instrument class first.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              Remove the extra bars and try again. Please also try with just one connection. You should connect to the data provider you want to receive data from for that instrument class first.
              I'm connected to just Mirus now.

              - I had been running with ES 06-09 as my primary, and adding NG 1/5 minute bar (as in previous code).

              - If I now run on NG 1 minute as primary (and adding nothing), I AM getting live bars!

              - If I run on NG 5 minute as primary (and add NG 1 minute), I'm getting a LIVE 5 minute bar, but am NOT getting live 1 minute bars!!

              Is there something wrong with the way I'm using add? This code is veeeeeeeery proven with equities. I've changed nothing except the symbol, when coming to the future side.

              Comment


                #8
                How are you evaluating that you are not receiving the secondary bars? You receive multiple 5 mins with no 1 min updates on the same instrument?

                Please also try NG 5min primary and use Add(PeriodType.Minute, 1).
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Yea... I've flipped it around, and I can confirm that the primary bar is working great both historical AND live, while secondary bars only load in historical but not live.

                  Here's the results after being flipped:

                  instrument: NG 07-09, time: 6/5/2009 8:00:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:00:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:01:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:02:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:03:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:04:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:05:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:05:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:06:00 AM(historical)
                  instrument: NG 07-09, time: 6/5/2009 8:07:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:08:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:09:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:10:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:11:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:12:00 AM
                  instrument: NG 07-09, time: 6/5/2009 8:13:00 AM

                  You can see the doubled outputs at 5m intervals historical, but only 1m output while live.

                  Comment


                    #10
                    Originally posted by NinjaTrader_Josh View Post
                    Please also try NG 5min primary and use Add(PeriodType.Minute, 1).
                    This *is* working. I'm getting both 5m and 1m bars live and historical.

                    EDIT: But I really do need the other version of Add() working as well. I've been able to use it in the past (with Add("VX 06-09"...)). Why would there be a problem with the NG version?
                    Last edited by heech; 06-05-2009, 09:24 AM.

                    Comment


                      #11
                      I just tried with ES 06-09 on my end and not seeing what you are seeing. Primary = 1min

                      6/5/2009 9:24:00 AM BIP: 0 Historical: True
                      6/5/2009 9:24:00 AM BIP: 1 Historical: True
                      6/5/2009 9:25:00 AM BIP: 0 Historical: False
                      6/5/2009 9:26:00 AM BIP: 0 Historical: False
                      6/5/2009 9:27:00 AM BIP: 0 Historical: False
                      6/5/2009 9:27:00 AM BIP: 1 Historical: False
                      6/5/2009 9:28:00 AM BIP: 0 Historical: False

                      Code:
                      protected override void Initialize()
                      {
                          CalculateOnBarClose = true;
                          Add("ES 06-09", PeriodType.Minute, 3);
                      }
                      
                      /// <summary>
                      /// Called on each bar update event (incoming tick)
                      /// </summary>
                      protected override void OnBarUpdate()
                      {
                          Print(Time[0] + " BIP: " + BarsInProgress + " Historical: " + Historical);
                      }
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_Josh View Post
                        I just tried with ES 06-09 on my end and not seeing what you are seeing. Primary = 1min
                        Aha. ES 06-09 works for me as well, but NG 07-09 as a secondary instrument STILL does not. Please confirm on your side.

                        protected override void Initialize()
                        {
                        CalculateOnBarClose = true;
                        Add("ES 06-09", PeriodType.Minute, 1);
                        Add("NG 07-09", PeriodType.Minute, 1);
                        }

                        instrument: ES 06-09, time: 6/5/2009 8:32:00 AM(historical)
                        instrument: NG 07-09, time: 6/5/2009 8:32:00 AM(historical)
                        instrument: ES 06-09, time: 6/5/2009 8:33:00 AM(historical)
                        instrument: NG 07-09, time: 6/5/2009 8:33:00 AM(historical)
                        instrument: ES 06-09, time: 6/5/2009 8:34:00 AM

                        Comment


                          #13
                          Do you see anything in your Control Center logs?
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_Josh View Post
                            Do you see anything in your Control Center logs?
                            No, nothing relevant + recent at all.

                            Do you have a feed with NG? Any ZenFire feed should have it. If not, I can share my IQFeed account while you debug this.

                            Comment


                              #15
                              I have data and am investigating.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Currandeny, Today, 05:32 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post Currandeny  
                              Started by pjsmith, Today, 01:00 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NT-Roland  
                              Started by alejandro888, Yesterday, 08:41 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post alejandro888  
                              Started by UltraNIX, Today, 02:14 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post UltraNIX  
                              Started by augustfay, Yesterday, 12:06 PM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_Jason  
                              Working...
                              X