NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-21-2012, 10:37 PM   #1
neoikon
Senior Member
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 119
Thanks: 44
Thanked 5 times in 4 posts
Default 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
neoikon is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating time of a future bar ScottB Strategy Development 6 04-11-2011 09:42 AM
Marking future dates on charts billr Charting 3 04-11-2011 08:49 AM
Bug: 1 min bar mini-Dow import of GMT+0 data is converted wrong by NT7 for old dates. ChiTrader2000 Version 7 Beta General Questions & Bug Reports 11 11-15-2009 04:42 PM
Easy way to determine last bar? terenyi General Programming 2 09-08-2008 03:44 PM
Bar Dates from custom Optimize metric Matt_H Miscellaneous Support 5 08-08-2007 11:15 AM


All times are GMT -6. The time now is 07:07 AM.