You can use the example code from the help and ask for just a 60 minute set of minute bars from any given day. I'm getting about a day's worth of bars even though I'm only asking for an hour. Which is pretty computationally wasteful for both the API and my code because I have to wade through and find just he data I need and you create a lot more objects than I asked for.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
B9 BarsRequest returns far more data than requested
Collapse
X
-
B9 BarsRequest returns far more data than requested
There are some scenarios where I want to grab just a specific slice of data.
You can use the example code from the help and ask for just a 60 minute set of minute bars from any given day. I'm getting about a day's worth of bars even though I'm only asking for an hour. Which is pretty computationally wasteful for both the API and my code because I have to wade through and find just he data I need and you create a lot more objects than I asked for.
Tags: None
-
Same problem for me.
The bar request returns an entire day. And because I need 1 tick data bars, the loading time can be up to 10 seconds on ES for example.
However, it was already the case (for tick bars) with Beta 8.
--
Christophe - Ninja-Addons.com
NinjaTrader 3rd Party
http://www.ninja-addons.com - http://www.neat-markets.com
-
If you specify Days (e.g., Time) in your parameters, it will return at minimum one trading day for caching reasons. This is the same as a Chart.Originally posted by RanchoDinero View PostThere are some scenarios where I want to grab just a specific slice of data.
You can use the example code from the help and ask for just a 60 minute set of minute bars from any given day. I'm getting about a day's worth of bars even though I'm only asking for an hour. Which is pretty computationally wasteful for both the API and my code because I have to wade through and find just he data I need and you create a lot more objects than I asked for.
http://ninjatrader.com/support/helpG...arsrequest.htm
If you only need a subset of bars, use the "bars" parameter in your bar request.
Code:BarsRequest(Instrument instrument, int barsBack)
MatthewNinjaTrader Product Management
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
24 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
14 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
19 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|
||
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
135 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|

Comment