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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      82 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      43 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      56 views
      0 likes
      Last Post CarlTrading  
      Working...
      X