• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cbi.Globals.MinDate

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

    Cbi.Globals.MinDate

    What is the equivalent of Cbi.Globals.MinDate in NT8?


    Example in NT7

    #2
    Hello Brillo, and thank you for your question.

    Cbi.Globals.MinDate is a C# DateTime object which is used as an earliest possible date. Generally, the common convention across the world is to use a time called "the epoch" (January 1st, 1970 AD) for this purpose. In Unix systems, for instance, this is time 0, and time 86400 would be 1 day after the epoch since there are 86400 seconds in a day.

    This time can be represented in C# as follows :

    Code:
    new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
    Otherwise, to get the actual NT7 value of Cbi.Globals.MinDate (January 1st, 1 BC), we can use

    Code:
    new DateTime(0, 1, 1, 0, 0, 0, DateTimeKind.Utc)
    Please let us know if there are any other ways we may help.
    Last edited by NinjaTrader_JessicaP; 11-10-2016, 11:24 AM.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Brillo View Post
      What is the equivalent of Cbi.Globals.MinDate in NT8?


      Example in NT7
      These types of undocumented utilities have been moved to the NinjaTrader.Core namespaces and located in the Globals class.

      NinjaTrader.Core.Globals.MinDate

      Please note that this is an undocumented class any members and their return values are subject to change without notice.

      You may find it safer to code your own static values in your own utility class.
      MatthewNinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by dkbyond, Today, 04:11 PM
      0 responses
      5 views
      0 likes
      Last Post dkbyond
      by dkbyond
       
      Started by markus3500, Today, 03:29 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_EricB  
      Started by bohenriksen, Today, 04:00 AM
      1 response
      21 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by brett0, Today, 12:33 PM
      3 responses
      14 views
      0 likes
      Last Post marcus2300  
      Started by lordvader34, Today, 11:12 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_PatrickG  
      Working...
      X