Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access intraday bars for prior time window

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

    Access intraday bars for prior time window

    Hello, on an intraday chart (FX), how would I access the indexes of the bars that occurred during a previous time window?

    For example if the chart is 60M, 7 bars into the day with 7th bar still open, how would I be able to know that the 60M bars that make up yesterday are [7] through [30]?

    On a 240M, 4 bars in to a new week with 4th bar still open, how could I know that the indexes of bars [4] through [33] make up the previous week?

    Thanks!

    #2
    Originally posted by entropy View Post
    Hello, on an intraday chart (FX), how would I access the indexes of the bars that occurred during a previous time window?

    For example if the chart is 60M, 7 bars into the day with 7th bar still open, how would I be able to know that the 60M bars that make up yesterday are [7] through [30]?
    Bars.GetBar(Time[0].AddDays(-1))
    On a 240M, 4 bars in to a new week with 4th bar still open, how could I know that the indexes of bars [4] through [33] make up the previous week?

    Thanks!
    Same idea. Find the number of bars ago that represent the bar number that you seek, using the current bar time, and the required offset in time.

    Look up Bars.GetBar() in the NT Help.
    Last edited by koganam; 07-12-2015, 06:04 PM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by iseseora, Yesterday, 11:55 PM
    0 responses
    1 view
    0 likes
    Last Post iseseora  
    Started by dorotwart, Yesterday, 11:43 PM
    0 responses
    3 views
    0 likes
    Last Post dorotwart  
    Started by MatthewLesko, Yesterday, 11:13 PM
    0 responses
    3 views
    0 likes
    Last Post MatthewLesko  
    Started by Lance El Camino, Yesterday, 04:14 PM
    1 response
    13 views
    0 likes
    Last Post s.kinra
    by s.kinra
     
    Started by jtrading82, Yesterday, 04:56 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X