Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
dynamically change traded instrument list
Collapse
X
-
dynamically change traded instrument list
Hello. I developed a strategy that applies to all stocks in Russell 3000 Index. However, on a particular day, only a small number of stocks are traded. The stock symbols traded on a particular day are pre-determined and can be imported daily from a file. In the Initialize() method, do I need to add all 3000 stocks, or is there a way to only add the stocks traded for a particular day and change that list dynamically? Thank you for your help!Tags: None
-
Hi Tony, welcome to our forums here - unfortunately dynamically adding symbols would not be something we can support - it's on our list for future consideration though (I've added a vote into this tracking item on your behalf). So one way would be adding in all stocks and then drive logic dynamically per your file for the day, or to amend the Initialize() as needed on changes, but this would mean code changes as well, as the # of instruments that would be traded each day (as I understand) could vary.
-
Hi Bertrand. Thank you for your reply. You mentioned that I can amend the Initialize() method as needed to change the traded instrument list. My understanding is that this approach only works for live trading, where I can program to add the instruments traded for the given trading day. How do I do it for backtesting over multiple days? My understanding is that the Initialize() method only runs once when the backtest is started, therefore the instrument list cannot change over the backtest period. Is that correct? Thanks.
Comment
-
Hello upshot,
Thanks for your reply.
This would have to be coded into the BarsInProgress, it would not be possible to call Initialize() like this.Last edited by NinjaTrader_Brandon; 03-27-2014, 02:56 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment