Whether you apply the strategy to single instruments one at a time, or to single instruments contained in a list, the behavior is consistently the same: the primary series is the instrument to which the strategy is applied.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
is there any way to record volumes (ask size and bid size)
Collapse
X
-
If you apply your strategy to a list, then each instrument on the list will be the primary series on its own chart, so "item 0" will always be the instrument to which the strategy is applied; in this case, "item 0" will each be an instrument in the list to which the strategy is applied.Originally posted by fxeconomist View Post
Whether you apply the strategy to single instruments one at a time, or to single instruments contained in a list, the behavior is consistently the same: the primary series is the instrument to which the strategy is applied.
-
So, translating this, if I attach the strategy to a list, that won't make it a multi-instrument strategy; Ninja will attach to each instance of the strategy one of the assets of the list, running it in a portfolio manner. Opening more than one data series in a strategy is strictly something that is about "programming" rather than "setting up the parameters". Guess I got it.Originally posted by NinjaTrader_Josh View Postfxeconomist,
You will only know when you are done processing Initialize().
What is your concern for this info though? If you really want it to just be all known what you can do is completely ignore BarsInProgress 0, add all the series you want and then you will know what 1, 2, 3, 4 will be based on the order you added them in Initialize().
Also, you will always know what 0 is before you even begin the script because that is the series you will be adding your script onto. If you need it to be 6E or 6J, just make sure you correctly add it to the 6E or 6J chart.
Comment
-
What if I would programatically add one of the symbols that would be the same as the on BarsInProgress 0 ? Would that be possible or generate an error? But I code around to avoid this. The real issue about running it on asset that I don't need as BarsInProgress 0 is that I would create unwanted latency by processing something that I don't need, but gets as far as the OnMarketUpdate(), stealing from the arrival time of the ticks that I need.Originally posted by NinjaTrader_Josh View Postfxeconomist,
You will only know when you are done processing Initialize().
What is your concern for this info though? If you really want it to just be all known what you can do is completely ignore BarsInProgress 0, add all the series you want and then you will know what 1, 2, 3, 4 will be based on the order you added them in Initialize().
Also, you will always know what 0 is before you even begin the script because that is the series you will be adding your script onto. If you need it to be 6E or 6J, just make sure you correctly add it to the 6E or 6J chart.
Comment
-
fxeconomist, there will be no issue with adding a series exactly the same as the primary one. As for the latency issue, I was curious about this myself, so I just created a simple test to see how much latency there is between the different BarsInProgress calls. From what I can tell, there is no difference, at least not with my PC's time resolution (0.0005 seconds). The latency between your computer and your broker through the internet will be at least a hundred times greater than what this test shows.AustinNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
590 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
342 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
555 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment