Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CurrentBar

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

    CurrentBar

    CurrentBar = the first bar on the right of the chart completed.

    Is it possible to get the first bar at the right in progress?
    Base onRender

    TY

    #2
    Hello frankduc, thank you for your post.

    If your script runs OnEachTick then you will see that CurrentBar will stay the same number over many OnBarUpdate calls, so CurrentBar will give you the currently forming bar number. If your script runs OnBarClose then CurrentBar will have a unique value for each call to OnBarUpdate. OnRender will be the same case as my former statement about the OnEachTick script, OnRender can be called any number of times throughout the formation of the bar so technically CurrentBar is the currently forming bar on the right.

    Best regards.
    Last edited by NinjaTrader_ChrisL; 07-23-2019, 01:11 PM.

    Comment

    Latest Posts

    Collapse

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