Last question when backtesting in strategy analyzer if i start from 01/01/23 till present, do i just enter mnq 09-23 contract or i have to start with contract that was back in january? I have merge back adjusted selected.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Index was outside the bounds of the array
Collapse
X
-
Hello tkaboris,
Thanks for your notes.
"do i just enter mnq 09-23 contract or i have to start with contract that was back in january?"
You could specify the current contract month, such as MNQ 09-23, when calling AddDataSeries() in your script.
"And so i cant supply arguments to adddataseries dynamically"
Correct, you must hardcode the arguments into the AddDataSeries() method instead of call AddDataSeries() dynamically.
"but i can at least to have a bool whether to select to use higher time frame or not."
No, you should not dynamically add a data series by calling AddDataSeries() when a certain bool is true. This is considered dynamically adding a data series based on runtime variables and should be avoided.
From the help guide: ": "Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error""<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>
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
173 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
91 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
130 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
209 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
186 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment