Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to get the time associated with a bar?

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

    Is there a way to get the time associated with a bar?

    Hello,

    I'm doing some work on a custom indicator and need to review the bars that have occurred since the market opened, but not before.

    Is there something like Time[0] that indicates what time a bar occurred? That would let me go back to the bar that started the day. Another option would be something that would tell me how many bars have occurred since the market opened.

    I understand that I would need to use CurrentBar to make sure that I didn't ask for data that had not been loaded.

    My fallback is to use datetime.now and count the number but I wanted to see if there was something built in first.

    thanks!

    john

    #2
    Duh, never mind, just found it.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    75 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    26 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    62 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X