Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

First bars of session missing

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

    First bars of session missing

    I must be missing something simple here. I have the following situation. Market replay, paused at 1st Aug 2011, 07:00:10 UK time. If I run a completely empty strategy that just logs the current bar in OnBarUpdate() against FDAX 09-11, with days to load = 1, bars req = 0, default 24/7, series renko 6. When I enable the strategy, OnBarUpdate does not log the first two bars (0 and 1) and starts logging CurrentBar == 2. I can see the first two bars on a chart though.

    What am I missing?

    thanks
    Dave

    #2
    Hello,

    What do you have your maximum bars look back set too. Change to infinite and retest.

    Other then that would need to debug further as I ran a quick test here on a debug indicator: I get Bar 0 in my output.

    0
    8/21/2011 4:00:03 PM - 0: Bars.TickCount = 89
    8/21/2011 4:00:03 PM - 0: FirstBarOfSessionTriggered
    8/21/2011 4:00:03 PM - 0: FirstTickOfBarTriggered
    1
    8/21/2011 4:00:03 PM - 1: Bars.TickCount = 89
    8/21/2011 4:00:03 PM - 1: FirstTickOfBarTriggered
    2
    8/21/2011 4:00:03 PM - 2: Bars.TickCount = 89
    8/21/2011 4:00:03 PM - 2: FirstTickOfBarTriggered
    3

    Comment


      #3
      Thanks Brett,

      Setting to infinite makes no difference. Please note, 7am UK time is the session start - is that what you were testing? 4pm doesn't sound like a session start.

      Also, this is COBC = true;

      thanks
      Dave

      Comment


        #4
        Hello,

        Na I was testing another time zone at the time. Would not expect time zone to matter here.

        At this point would need you to psot code your using as not seeing the same on my side with COBC = true and my test code on renko with bars req=0 and days to load =1. I'm in MT time now which would be 7:30 AM and still get bar 0.

        Let me know if I can be of further assistance.

        0
        8/23/2011 7:30:09 AM - 0: FirstBarOfSessionTriggered
        8/23/2011 7:30:09 AM - 0: FirstTickOfBarTriggered
        1
        8/23/2011 7:30:40 AM - 1: FirstTickOfBarTriggered
        2
        8/23/2011 7:31:09 AM - 2: FirstTickOfBarTriggered
        3
        8/23/2011 7:31:12 AM - 3: FirstTickOfBarTriggered
        4
        8/23/2011 7:32:16 AM - 4: FirstTickOfBarTriggered
        5
        8/23/2011 7:32:16 AM - 5: FirstTickOfBarTriggered
        6

        Comment


          #5
          Errr. here's the code. Could you maybe print the bar time rather than the current time, since that will be far more useful.

          Code:
          protected override void OnBarUpdate()
                  {
                      Print(Time[0]+" OBU BIP / CB / vol = "+BarsInProgress+" | "+CurrentBar+" | "+Volume[0]);
                      
                  }
          By the way, I started the strat from a chart, if that makes any difference

          thanks
          Dave

          Comment


            #6
            When I tried it on 23 aug, it sort of worked, except it started bars from 22nd. Could you please try 1 aug?

            22/08/2011 07:00:07 OBU BIP / CB / vol = 0 | 0 | 5
            22/08/2011 07:00:10 OBU BIP / CB / vol = 0 | 1 | 16
            22/08/2011 07:00:31 OBU BIP / CB / vol = 0 | 2 | 63
            22/08/2011 07:01:45 OBU BIP / CB / vol = 0 | 3 | 159
            22/08/2011 07:01:55 OBU BIP / CB / vol = 0 | 4 | 29
            22/08/2011 07:02:30 OBU BIP / CB / vol = 0 | 5 | 57
            22/08/2011 07:02:30 OBU BIP / CB / vol = 0 | 6 | 7

            Comment


              #7
              My output matches yours.

              8/22/2011 12:00:06 AM OBU BIP / CB / vol = 0 | 0 | 184

              Comment


                #8
                Here is with better session template:

                8/22/2011 7:30:01 AM OBU BIP / CB / vol = 0 | 0 | 32
                8/22/2011 7:30:01 AM - 0: FirstBarOfSessionTriggered
                8/22/2011 7:30:01 AM - 0: FirstTickOfBarTriggered
                8/22/2011 7:30:08 AM OBU BIP / CB / vol = 0 | 1 | 148
                8/22/2011 7:30:08 AM - 1: FirstTickOfBarTriggered
                8/22/2011 7:30:22 AM OBU BIP / CB / vol = 0 | 2 | 111

                Comment


                  #9
                  What session template are you using?

                  Comment


                    #10
                    Yes, I said mine is OK for 22 aug. Could you please try 1 aug.

                    Happens for session instrument and 24/7

                    thanks
                    Dave

                    Comment


                      #11
                      Ran on Aug 1st. 1 days load of data with default 24/7 COBC = true.

                      8/1/2011 12:00:05 AM OBU BIP / CB / vol = 0 | 0 | 32
                      8/1/2011 12:00:05 AM - 0: FirstBarOfSessionTriggered
                      8/1/2011 12:00:05 AM - 0: FirstTickOfBarTriggered
                      8/1/2011 12:00:05 AM OBU BIP / CB / vol = 0 | 1 | 69
                      8/1/2011 12:00:05 AM - 1: FirstTickOfBarTriggered
                      8/1/2011 12:00:05 AM OBU BIP / CB / vol = 0 | 2 | 87
                      8/1/2011 12:00:05 AM - 2: FirstTickOfBarTriggered
                      8/1/2011 12:00:06 AM OBU BIP / CB / vol = 0 | 3 | 37
                      8/1/2011 12:00:06 AM - 3: FirstTickOfBarTriggered
                      8/1/2011 12:00:06 AM OBU BIP / CB / vol = 0 | 4 | 40
                      8/1/2011 12:00:06 AM - 4: FirstTickOfBarTriggered
                      8/1/2011 12:00:06 AM OBU BIP / CB / vol = 0 | 5 | 66
                      8/1/2011 12:00:06 AM - 5: FirstTickOfBarTriggered
                      8/1/2011 12:00:06 AM OBU BIP / CB / vol = 0 | 6 | 97

                      Comment


                        #12
                        Thanks Brett,

                        As you can see, I get the same output with the first two bars missing. Could you possibly ask your dev team for some ideas about what this could be - i'm sure they'll have one or two suggestions. (Incidentally, if I set bars required to 10 and then look back at the first bar available, it's still the third bar of the session.)

                        Just to recap, days to load = 1, default 24/7, min bars = 0, COBC=true, barslookback = 256

                        regards
                        Dave

                        Code:
                        **NT** Enabling NinjaScript strategy 'xx1/ae22019200eb408ca2e266dae7cb3fd0' 
                        01/08/2011 07:00:05 OBU BIP / CB / vol = 0 | 2 | 87
                        01/08/2011 07:00:06 OBU BIP / CB / vol = 0 | 3 | 37
                        01/08/2011 07:00:06 OBU BIP / CB / vol = 0 | 4 | 40
                        01/08/2011 07:00:06 OBU BIP / CB / vol = 0 | 5 | 66
                        01/08/2011 07:00:06 OBU BIP / CB / vol = 0 | 6 | 97
                        01/08/2011 07:00:06 OBU BIP / CB / vol = 0 | 7 | 108

                        Comment


                          #13
                          Hello,

                          Some settings that are special on your side then. I can go to my dev team when I have something reproducible on my side. Until then we must continue to narrow down the differences and why this would occur.

                          We could try a remote session today so I can look around and see what I can find.

                          If you would like to do this ->support at ninjatrader dot com ATTN: Brett.

                          Thanks.

                          Comment


                            #14
                            Thanks Brett,

                            I can't do remote sessions. Any settings suggestions welcome. I would appreciate it if you could ask dev for their opinion.

                            regards
                            Dave

                            Comment


                              #15
                              Hello,

                              An issue must be fully vetted before I can go to the dev team as the dev team only works on bugs. This means I would need to isolate exactly what is causing the issue before I could go to development. As if I was to go to development the first thing they would need more information and a reproducible scenario which we currently do not have.

                              Such as whats the data look like on your PC, what bar series is in use, do you have any multi series scripts running at the same time, do you have another script that is calling Output window clear that is loading up after this indicator starts to run and is clearing the output window after the first 2 bars process since reload NinjaScript reloads all scripts.

                              There are still many variables here that need to be isolated before I could involve development. Therefor we still need to continue to run though this.

                              Next step would be to close all workspaces. Open only one chart. Run the test. Still issue there? If so then add this print line to SampleMACrossOver strategy, is problem still there?

                              If so please attach the workspace to the forum that this is occurring on and let me know what data feed provider you are using.

                              My Documents->NinjaTrader 7->Workspaces.


                              -Brett

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Javierw.ok  
                              Started by timmbbo, Today, 08:59 AM
                              2 responses
                              10 views
                              0 likes
                              Last Post bltdavid  
                              Started by alifarahani, Today, 09:40 AM
                              6 responses
                              41 views
                              0 likes
                              Last Post alifarahani  
                              Started by Waxavi, Today, 02:10 AM
                              1 response
                              21 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Working...
                              X