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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            88 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            134 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            68 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            119 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            69 views
            0 likes
            Last Post PaulMohn  
            Working...
            X