• 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

minutes

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

    minutes

    hi ... i need to identify certain time periods on a chart regardless of the type of chart i'm running (min, tick, range, etc). I want to do this by identifying the 'minutes' from the system time. Can you guide me to a reference where it shows how to parse the system time so I can isolate the minutes? Thanks!

    #2
    Hello Pman777,

    Thank you for your post.

    I don't quite follow along with what you are looking for.

    Could you please elaborate further or perhaps provide an example?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      sure ... i want to identify when a chart is approaching the one hour mark. So I want to check the system timer to see when this is happening.

      Comment


        #4
        correction ... I need to isolate the 'minutes' value on the time of the current bar

        Comment


          #5
          Pman777,

          This code example should work for what you are looking for -
          Code:
          DateTime test = DateTime.Now;
                          DateTime dateValue = new DateTime(test.Year, test.Month, test.Day, test.Hour + 1, 0, 0);
          				TimeSpan barsAgo = dateValue - Time[0];
          				Print(barsAgo.ToString());
          Cal H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NinjaCustomer, Yesterday, 11:35 PM
          0 responses
          2 views
          0 likes
          Last Post NinjaCustomer  
          Started by sdauteuil, Yesterday, 11:29 PM
          0 responses
          1 view
          0 likes
          Last Post sdauteuil  
          Started by williamzz, Yesterday, 09:50 PM
          0 responses
          19 views
          0 likes
          Last Post williamzz  
          Started by Steve L, Yesterday, 05:01 PM
          0 responses
          6 views
          0 likes
          Last Post Steve L
          by Steve L
           
          Started by Trader-Joe, Yesterday, 04:06 PM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Working...
          X