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 localappleseed, Today, 09:44 AM
    0 responses
    1 view
    0 likes
    Last Post localappleseed  
    Started by damianfanaro, Today, 06:28 AM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Lando Calrissian, Today, 08:43 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by daqu40, Today, 08:50 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by aslane, Today, 07:30 AM
    2 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X