Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots Problem NT 7.0.0.22

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

    Pivots Problem NT 7.0.0.22

    I have created a session with the session times of IBFX, that is basically GMT 0:00 to GMT 0:00 plus the two hours of Sunday.

    The pivots indicator in DailyBars mode does not catch yesterday's but today's high, low and close.

    Or did you rework the pivots indicator after the problems with the various methods?
    Attached Files

    #2
    The problem is that GetLastBarSessionDate() method of the pivots indicator which does not work correctly.

    For daily pivots it can be replaced with GetTradingDayFromLocal(). For weekly and monthly pivots needs some further modifications. Not a big deal.

    As far as I have tested GetTradingDayFromLocal() and GetDayBar() work correctly with the GMT Forex template, so only a small adjustment of the pivots indicator is needed.
    Last edited by Harry; 10-06-2010, 04:15 PM.

    Comment


      #3
      Harry,

      Can you please provide exact session template information instead of us guessing how you have that Sunday defined as it is not clear? Sunday 12AM - Sunday 2AM? Monday 12AM-Tuesday 12AM, Tuesday 12AM-Wednesday 12AM... etc? Something like that? Thank you.

      I assume you are still leaving your PC clock on GMT+1 as well, so session template = GMT, PC clock = GMT+1, correct?
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Josh View Post
        Harry,

        Can you please provide exact session template information instead of us guessing how you have that Sunday defined as it is not clear? Sunday 12AM - Sunday 2AM? Monday 12AM-Tuesday 12AM, Tuesday 12AM-Wednesday 12AM... etc? Something like that? Thank you.

        I assume you are still leaving your PC clock on GMT+1 as well, so session template = GMT, PC clock = GMT+1, correct?
        System clock

        GMT +1

        Preferred Session Template A (GMT)

        Sunday 10:00 PM to Tuesday 0:00 PM
        Tuesday 0:00 PM to Wednesday 0:00 PM
        Wednesday 0:00 PM to Thursday 0:00 PM
        Thursday 0:00 PM to Friday 0:00 PM
        Friday 0:00 PM to Friday 10:00 PM

        Alternative Session Template B (GMT)

        Sunday 10:00 PM to Monday 0:00 PM
        Monday 0:00 PM to Tuesday 0:00 PM
        Tuesday 0:00 PM to Wednesday 0:00 PM
        Wednesday 0:00 PM to Thursday 0:00 PM
        Thursday 0:00 PM to Friday 0:00 PM
        Friday 0:00 PM to Friday 10:00 PM

        Both Session Templates produce the error.

        Comment


          #5
          This is the midnight bug revisited

          I have further enquired into this. It is actually a problem that I have reported several times and that caused sessions not to be displayed.

          It is the midnight bug, The problem occured because I chose a session that lasts from 0:00 to 0:00 GMT. When using the Bars.Session.GetNextBeginEnd(), the end time will be in local time. The pivot indicator converts this to instrument time and then takes the date, which is one day later, because NT stores midnight (session end) as 0:00 next day.

          If you change the template time from 0:00 to 23:59 -> no problem. So all session templates that end at 0:00 exchange time have a problem.

          Pivot indicator false with Default 24/7 and 24/5 session templates for all instruments

          Funny enough, the pivots indicator does neither work with the Default 24/7 nor the Default 24/5 session template. I have never tested this because I dont use those.

          I have pointed out to the midnight bug already several times, as it also causes the disappearing of chart sessions.
          Last edited by Harry; 10-07-2010, 09:11 AM.

          Comment


            #6
            Not sure if what you have outlined as the potential source of the issue is the actual cause, but we were able to reproduce and are looking into this report. Thanks.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              change template from 0:00 to 23:59 -> no problem
              back to 0:00 -> bug reappears

              Code:
               
              if (Bars.BarsType.IsIntraday)
              {
              Bars.Session.GetNextBeginEnd(time, out cacheSessionBegin, out cacheSessionEnd);
              sessionDateTmp = System.TimeZoneInfo.ConvertTime(cacheSessionEnd, System.TimeZoneInfo.Local, Bars.Session.TimeZoneInfo).Date;
              }
              else
              sessionDateTmp = time.Date;
              The last line is where the problem probably occurs. SessionDateTemp is a time at midnight, and if you take the date it is next day.


              Originally posted by NinjaTrader_Josh View Post
              Not sure if what you have outlined as the potential source of the issue is the actual cause, but we were able to reproduce and are looking into this report. Thanks.

              Comment


                #8
                Hi Harry !

                The bug you reported is fixed and the fix will be available with the next update of NinjaTrader.

                Thanks for reporting !
                Christian
                ChristianSenior Software Developer

                Comment


                  #9
                  Harry, would you mind testing the fix by copying attached version, opening it in NS editor and compile? Please let me know if you needed more detailed instructions.

                  Thanks in advance
                  Attached Files

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by snoussi, Today, 12:26 PM
                  5 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by Richozzy38, Today, 01:06 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Richozzy38  
                  Started by reynoldsn, Today, 12:42 PM
                  1 response
                  6 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by f.saeidi, Today, 12:35 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by Italohispanico, Today, 12:39 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Italohispanico  
                  Working...
                  X