Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

net time

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

    net time

    I am trying to measure the time of a bar and if it is over 30 minutes, to color it black. this is what I have

    if( (ToTime(Time[0]) - ToTime(Time[1])) >= 3000)
    {
    BarColor = Color.Black;
    }

    Where am I going wrong?

    Thanks

    #2
    What is the behavior you are seeing right now? Suggest you print the values of ToTime() and run the calculations by hand to understand what the code is doing as well.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks, I figured it out using print output

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      550 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X