Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does CurrentBar constantly increment in RT?

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

    Does CurrentBar constantly increment in RT?

    Hi,

    I'm using NT 6.5. I want to write an indicator that updates with each tick, looking for a particular price event to occur within the forming bar - timewise, it could happen anywhere in the bar, so I can't use calculate on bar close (this indicator is for tick and range bars). However, I do only want to process the event once per bar.

    My thought was to use CurrentBar -- update a variable with the CurrentBar value when the event occurs, and then respond to the event again only when the value of CurrentBar has changed.

    Some TA programs support a fixed number of bars loaded, so CurrentBar is always the same value! So my question is, assuming you start NT for intra-day trading, and bars of course are continually created, does CurrentBar itself always show a new, larger value with each new bar? (My feed is Zenfire).

    Thanks!

    Regards,

    Gordon

    #2
    Hello,

    Yes! Think of CurrentBar as the count of bars on the chart at any time. It starts at zero on the left and as the chart grows it increases to x number bars and is incremented each new bar...by one:
    DenNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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