Questions like this are not easily answered without the code, or with only code snippets. Ricam is answering the question, but with out demonstarting it by refactoring the code in question.. which was never posted... it's hard to get the point across.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Index was outside the bounds of the array
Collapse
X
-
Maybe we should have a Refactor My Code Sub Forum
Questions like this are not easily answered without the code, or with only code snippets. Ricam is answering the question, but with out demonstarting it by refactoring the code in question.. which was never posted... it's hard to get the point across.
-
Right, the strategy has built in handling for the first few bars with Minimum Bars Required. Indicators will need this custom coded. The following post can help with these techniques:Originally posted by ch9090 View PostIs it the equivalent (in a more sophisticated way) of the minimum bars required (backtest)?
Ryan M.NinjaTrader Customer Service
Comment
-
Thank you Crassius, I didn't want to bother the board members with my code but you're right. Next time I'll post it so it is clearer and thus easier to solve.
I need to do some furhter testing with the DMIndex as it seems to easily generate memory exception errors contrary to the RSI that works fine. Strange because the DMIndex is an upgraded RSI.
More in the next episode :-)
All the best, Chris
Comment
-
Refactoring, and optimization for memory usage.
Crassius - I think this would be a great idea. On a similar note - I have, so far, seen no discussion in these forums, into the optimization of code to improve memory usage - especially that which is non-linear...Originally posted by Crassius View PostMaybe we should have a 'refactor my code' forum
I've recently developed a set of techniques to benchmark / query memory usage over time or iterations, and export the data to a spreadsheet for analysis and reporting. I find this extremely useful in optimizing my code and in isolating problematic sections, and I believe the importance of this is widely neglected when attempting to perform parametric cross-optimization.
I need to tidy up the code a little, but once I'm done I would be happy to post it here, and write a short article on this topic. Perhaps we could get a dedicated sticky?
I'm fairly busy right at the moment, so will likely be at some point next week.
J
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
65 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
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment