NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Suggestions and Feedback > Suggestions And Feedback

Suggestions And Feedback New feature suggestions and feedback.

Reply
 
Thread Tools Display Modes
Old 06-17-2011, 10:55 AM   #1
anachronist
Senior Member
 
Join Date: Jul 2008
Posts: 271
Thanks: 4
Thanked 7 times in 7 posts
Default Display bar number somewhere

I'd like to have a way to display the bar number. This would really facilitate debugging my scripts. Either one of these would make me happy:
  • Beside or underneath the date in the Data Box
  • Beside the Time on the X-axis crosshair label
If there's already a way to see the number of a particular bar while viewing a chart, I'd like to know.

Right now I must insert the line Print(CurrentBar.ToString()+" "+Time[0].ToString()) in my indicator to get a list of bar numbers in the output window corresponding to each date/time. It would be nice not to have to do that.

-A
anachronist is offline  
Reply With Quote
Old 06-17-2011, 11:06 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi anachronist,

There is at least one script in the file sharing section that does this. Check the 6.5 and 7 indicators section and let me know if you're not able to find it.

You can also custom program a solution here, by using CurrentBar in a DrawText() statement.

http://www.ninjatrader.com/support/h...7/drawtext.htm
NinjaTrader_RyanM is offline  
Reply With Quote
Old 06-17-2011, 11:35 AM   #3
anachronist
Senior Member
 
Join Date: Jul 2008
Posts: 271
Thanks: 4
Thanked 7 times in 7 posts
Default

Thanks for the advice. The point is to be able to hover the mouse over a bar and see the number. DrawText() won't work for that purpose.

I guess I could write a simple indicator that displays the bar number; then it would show up in the Data Box.

-A
anachronist is offline  
Reply With Quote
Reply

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
CurrentBar: Flag to note when bar number first increments to next bar tonyh General Programming 2 05-09-2011 11:45 AM
display account number ? ssylwester Charting 1 03-15-2011 08:46 AM
Bar Number gviand General Programming 3 12-02-2010 01:56 AM
Relative Bar Number WolliWilli Version 7 Beta General Questions & Bug Reports 3 11-09-2009 08:21 AM
Bar index from the session or plot bar number on an intraday chart eneratom General Programming 1 02-27-2008 06:48 AM


All times are GMT -6. The time now is 06:06 PM.