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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X