Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Display bar number somewhere

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

    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

    #2
    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.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      556 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 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
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X