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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      152 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      305 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      176 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X