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 NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            93 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            152 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            80 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            53 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            65 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X