Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ToTime in 7 vs 6.5

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

    ToTime in 7 vs 6.5

    trying to convert NT7 beta 5 code back to 6.5 and get the attached error with respect to the handling of ToTime

    in both NT versions, I declare using 'private int' and in 6.5 do the same comparison in 'if' code...i.e. the exact same code works fine in 6.5 if created/compiled in 6.5

    apparently 7 uses SystemInt32 which 6.5 does not

    please provide workaround or alternate code...

    thanks.
    Attached Files

    #2
    is there a way to get the most recent version of NT from the existing platform without having to re-establish connectivity and so forth?

    Comment


      #3
      Originally posted by laredo View Post
      is there a way to get the most recent version of NT from the existing platform without having to re-establish connectivity and so forth?
      Would you mind clarifying your question? Thanks in advance.
      RayNinjaTrader Customer Service

      Comment


        #4
        Originally posted by ATI user View Post
        trying to convert NT7 beta 5 code back to 6.5 and get the attached error with respect to the handling of ToTime

        in both NT versions, I declare using 'private int' and in 6.5 do the same comparison in 'if' code...i.e. the exact same code works fine in 6.5 if created/compiled in 6.5

        apparently 7 uses SystemInt32 which 6.5 does not

        please provide workaround or alternate code...

        thanks.
        Looks like SessionStart etc... is a DateTime object?
        RayNinjaTrader Customer Service

        Comment


          #5
          how do i get the most recent edition of ninjatrader onto my trading account/platform/workspaces?

          Comment


            #6
            yes....my confusion is that my code is the same in both NT versions however 7 flags as an error

            i.e. in both cases I just declare as 'private int' and then use in conditional ....6.5 does not mind...7 does

            prior to doing this in 6.5 I used to use

            private TimeSpan sessionStartTime = new TimeSpan(9, 30, 00)

            ....which then requires checking hour and min..etc.....not as good/convenient as ....

            private int sessionStart = 93000;
            ....and...
            if ( ToTime(Time[0]) >= sessionStart

            7 does not allow this...

            Comment


              #7
              Originally posted by laredo View Post
              how do i get the most recent edition of ninjatrader onto my trading account/platform/workspaces?
              Not sure what you mean? Would you mind elaborating? Thanks in advance.
              RayNinjaTrader Customer Service

              Comment


                #8
                I suspect because Laredo is in the wrong thread my question re ToTime is getting missed?

                Comment


                  #9
                  ATI user,

                  NT7 has not made any changes in regards to doing ToTime() and comparing it against an int. Are you sure you are debugging the correct lines of code?
                  Attached Files
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    you are right...had nothing to do with ToTime

                    I assume the problem was the the words 'sessionStart' and sessionEnd' are not keywords in NT7...however they are in 6.5....hence the System32 error

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    602 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    347 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    103 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    560 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    559 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X