Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Referencing Time

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

    Referencing Time

    Hi,
    I'm writing an indicator that is look at a time analysis. I'm wondering if there is simple reference to the the fist bar of the DataSeries in the reference of Time. IE: DateTime variable. I've been looking but haven't found it yet. I love the DateTime.now. but I want to reference the first bar in a DateTime fashion

    Another question, what's the best way to compare 2 points in time if you are looking for a recurring event. IE:
    Let's say you look back in time for when price has closed below a certain price level and you store that in time. IE: ES < 800 and you want to save that time to an array or list and see when and if it's done that at a later time still in the past but that next time maybe days,weeks, or months different.
    Thanks

    #2
    doubletop, you can simply access Time[0] on the first OnBarUpdate() call (CurrentBar == 0), that's the first bar then.

    For the second question, we're not really clear what you seek unfortunately - you would store the DateTime of the event happening (your condition) and then would need to create your custom comparison logic to generate your signals out of this mining process.

    Comment


      #3
      Thanks Bertrand,
      I didn't want to have to resort OnBarUpdate first bar logic. I thought there must be another way to reference that like GetBarsTime() or something.

      Comment


        #4
        Hello,

        Nothing that is supported or mentioned in our help guide, I will send the suggestion into development.

        Thank You.
        BrettNinjaTrader Product Management

        Comment


          #5
          Thanks doubletop, added into our product enhancement tracking lists under id # 1879.

          We appreciate your input to further evolve our NinjaTrader platform,

          Comment


            #6
            difficult question , search in https://www.google.com/ better

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            595 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            554 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X