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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    229 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    147 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    160 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    239 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    197 views
    0 likes
    Last Post CarlTrading  
    Working...
    X