Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StartTime/EndTime format?

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

    #16
    Hello,

    You want to use the right tool for the right job. In this case DateTime is the best format for the job. ToTime has limitations that make it not able to use here and is a basic format in general that I suggest you graduate into using DateTime if possible as they have features(Like the one I just showed you) that make it the superior format for Date and Time manipulation.


    -Brett
    BrettNinjaTrader Product Management

    Comment


      #17
      No need to use a sledge hammer when a finishing hammer is the proper tool for the job. Graduating to DateTime would be a good thing when necessary, but it seems to me that all you did was make the Year, Month, and Date basically useless in this context, with only the hhmmss remaining. So then why use it in THIS application. NinjaTrader has obviouly designed Drawing Object syntax to be flexible for different programming needs. The DateTime "one size fits all" approach seems to be at odds with NinjaTrader's own flexibility standard.

      Thanks again for all your input
      Last edited by kenb2004; 07-17-2012, 08:24 AM.

      Comment


        #18
        No problem.
        BrettNinjaTrader Product Management

        Comment


          #19
          Originally posted by kenb2004 View Post
          No need to use a sledge hammer when a finishing hammer is the proper tool for the job. Graduating to DateTime would be a good thing when necessary, but it seems to me that all you did was make the Year, Month, and Date basically useless in this context, with only the hhmmss remaining. So then why use it in THIS application. NinjaTrader has obviouly designed Drawing Object syntax to be flexible for different programming needs. The DateTime "one size fits all" approach seems to be at odds with NinjaTrader's own flexibility standard.

          Thanks again for all your input
          Actually for what you want to do, you are going to have to access the DataTime() structure at some point as it is the only way you are going to get the value to differentiate different days: ToTime() is limited to returning an int, derived from the time component only.

          The point is then moot. If you are going to have to use the more powerful construct anyway, then just use it for everything in this particular instance.

          Comment


            #20
            koganam

            As always thanks for your expertise.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NTEducationTeam, 07-14-2025, 01:49 PM
            0 responses
            44 views
            0 likes
            Last Post NTEducationTeam  
            Started by NTEducationTeam, 07-14-2025, 01:24 PM
            0 responses
            34 views
            0 likes
            Last Post NTEducationTeam  
            Started by saltminer, 07-07-2025, 01:43 PM
            1 response
            133 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by idude, 07-08-2025, 05:06 AM
            0 responses
            57 views
            0 likes
            Last Post idude
            by idude
             
            Started by music_p13, 07-05-2025, 11:33 PM
            1 response
            55 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X