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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    30 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    17 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    9 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    16 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    19 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X