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

    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.

        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 zstheorist, Today, 07:52 PM
            0 responses
            7 views
            0 likes
            Last Post zstheorist  
            Started by pmachiraju, 11-01-2023, 04:46 AM
            8 responses
            150 views
            0 likes
            Last Post rehmans
            by rehmans
             
            Started by mattbsea, Today, 05:44 PM
            0 responses
            6 views
            0 likes
            Last Post mattbsea  
            Started by RideMe, 04-07-2024, 04:54 PM
            6 responses
            33 views
            0 likes
            Last Post RideMe
            by RideMe
             
            Started by tkaboris, Today, 05:13 PM
            0 responses
            6 views
            0 likes
            Last Post tkaboris  
            Working...
            X