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