Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Determine future bar indexes and dates

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

    Determine future bar indexes and dates

    I'm trying to determine the bar index or the date of a bar in the future.

    If I go 20 bars in the future from the current bar, then I will know the bar index, but how do I determine the date of that bar? Time[] doesn't seem to work for future bars (always tomorrow's date).

    Otherwise, if I know the date in the future, such as one month from today, then I will know the date, but how do I determine the bar index? GetBar() seems to always return 0 for future bars.

    Is there another technique that I'm missing?

    Thanks!
    Daniel

    #2
    Hello Daniel, the is unfortunately no supported concept available for determining future bar indices. The Current one is at 0 and that's the 'rightmost' one we would support to access.

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hello Daniel, the is unfortunately no supported concept available for determining future bar indices. The Current one is at 0 and that's the 'rightmost' one we would support to access.

      Bertrand & Daniel,

      This method works fine in my indicators when determining future dates:



      //Fredrik
      Attached Files
      Last edited by FREEN; 05-23-2012, 02:05 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X