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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      22 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      280 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      279 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      130 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      90 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X