Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar Number from Time ?

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

    Bar Number from Time ?

    How do I get the bar number of a specific time? eg, I'd like to get the bar number of the 1 tick series at thirty seconds after the beginning of a minute. (Seems like Chelsea pointed me to this awhile back. I sure can't find this in the Help Guide. "GetBars [x]" ?)

    #2
    Hello, thanks for writing in. We have this method that will get the bar index given a timestamp:

    Comment


      #3
      Mmm. That looks like it needs to be implemented from within a chart. I'm trying to do this entirely within a strategy script.

      Comment


        #4
        Hi, you can still call this from a strategy that is running on a chart, just not from the Control Center.

        Comment


          #5
          Well, maybe I'm fixated on that other method. Does "GetBars()" make any sense?

          Comment


            #6
            Hi, there is no method called GetBars() there is only these two which will let you get a bar index:

            GetBarIdxByTime()
            GetBarIdxByX()

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            81 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            42 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            64 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            66 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            54 views
            0 likes
            Last Post CarlTrading  
            Working...
            X