Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar Count Management

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

    Bar Count Management

    Hi,

    I am looking for a way to pick up how many bars there are between a High and Low given a time window specified. I can easily pull the Min() and Max() prices over a historical period however am struggling to get a bar count between these two values. A time isn't sufficient since I will be doing this across many windows and potentially volume intervals. Any help would be greatly appreciated.

    thanks

    #2
    Hello,

    Thanks for your post and welcome to the NinjaTrader forum!

    Please try the following:

    Math.Abs(HighestBar(Input, 20)-LowestBar(Input, 20));

    This will give the absolute position of the count of the highest bar - the lowest bar.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    83 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    47 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X