Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Adding instrument and controlling the # of its bars
Collapse
X
-
savekad,
Unfortunately there isn't any way to force a number of bars to load currently. Essentially the bars will start with the first one on your chart and iterate forward from there.
If you ensure that you have historical data saved for the instruments you are loading you should have access to it depending on the time frame.Adam P.NinjaTrader Customer Service
-
But AFAIK, added Bars object gets the same number of bars as the base chart Bars object only when "Load data based on" property is set to 'Bars'.
And one other thing, is there maybe a way to condition an indicator to execute its logic only if "Load data based on" is set to 'Bars' and has at least a certain number of bars?
Comment
-
Hello,
You would not be able to check that specifically but you can access the from and to date that is generated from the setting the user specifies.
Bars.BarsData.From
Bars.BarsData.To
Furthermore you could access the number of bars on the chart:
Bars.Count
-BrettBrettNinjaTrader Product Management
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
637 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
571 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment