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 CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
56 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
34 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
195 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
359 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
281 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment