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