Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bars loaded after DataLoaded state
Collapse
X
-
Bars loaded after DataLoaded state
Does the data accessible in DataLoaded state include the bar in progress? Say I use Close.GetValueAt(Close.count - 1), which should be the last element of the array, do I get the close of the bar in progress in the chart or the one before?Tags: None
-
Hello amaltais,
Thank you for your post.
BarsInProgress is an index value of the current Bars object that has called the OnBarUpdate() method.
Instead of using Close.GetValueAt, you could use plural Series objects such as Closes[ ].GetValueAt. Closes holds an array of Series<double> objects holding historical bar Close prices. To reference the current bar, you would use Closes[0].GetValueAt. The previous bar would be referenced as Closes[1].GetValueAt.
Please see this help guide link for more information about Closes[ ] - https://ninjatrader.com/support/help...ightsub=Closes
Also, see this help guide link about BarsInProgress for more information - https://ninjatrader.com/support/help...inprogress.htm
Let us know if we may assist further.
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
32 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
195 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
356 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
274 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment