Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar Numbering

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

    Bar Numbering

    Hi Support and Community,

    Can anyone help me to modify the BarNumber indicator (attached),the way,so it would calculates the certain set of bars.For e.g.,it starts to count from anywhere,and it counts the 10 bars set,from 1 to 10,and then starts it over,from 1 to 10 and so on?

    Thanks
    Attached Files

    #2
    Hello Cachevery,

    Thank you for your post.

    While we cannot offer custom development for scripts, I will leave this thread open for any of our other users to assist you in this matter.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hello Cachevery!

      #region Variables
      int numbar;
      ......

      protected override void OnBarUpdate()
      {

      Plot0.Set(
      0.0);
      Plot1.Set(
      2.0);

      if (Bars.FirstBarOfSession||numbar>9)
      numbar =
      1;
      else numbar =numbar+ 1;
      DrawText(
      "bnum" + CurrentBar, Convert.ToString(numbar), 0, 1.0 , Color.Black);

      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      160 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      308 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X