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 fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,406 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    98 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    9 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X