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 CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            369 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            237 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            205 views
            1 like
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            292 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            252 views
            0 likes
            Last Post CarlTrading  
            Working...
            X