Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Prolonged execution time Strategy Builder
Collapse
X
-
Prolonged execution time Strategy Builder
Hi. I would like to see if you can help me. In the Strategies tab within the NinjaScript Explorer, I have created 7 automatic strategies. The problem I have is that when I access any of them or try to create a new program it takes a long time to load, to add conditions within the Strategy Builder and to save the changes. With the consequent problem that this entails when you are making changes in the configuration of a strategy and testing it in the Strategy Analyzer. I do not know what can be due since my PC is i7 with 16Gb ram.
Thanks for your time. RegardsTags: None
-
Hello Rober182,
Thanks for your post.
The Strategy Builder will create XML code that represents your logic configured in the Builder. When compiled, the script will generate NinjaScript code which is what actually gets processed in the platform. Both Strategy Builder XML and NinjaScript code are included in the file, so a complex Strategy Builder strategy will create a large file that will take a longer time to load than a standard NinjaScript strategy.
Additionally, when backtesting, Strategy Builder strategies do not take advantage of IsInstantiatedOnEachOptimizationIteration since the generated code does not generate the code necessary to reset class level variables. IsInstantiatedOnEachOptimizationIteration is used to improve backtests speeds. Please see below for more details.
IsInstantiatedOnEachOptimizationIteration - https://ninjatrader.com/support/help...niteration.htm
The Strategy Builder is designed for creating simple strategies. A complex Strategy Builder strategy will take a long time to load for the reasons stated above and cannot be optimized for backtesting speeds because the generated code does not handle the behavior needed for IsInstantiatedOnEachOptimizationIteration.
To improve strategy loading times, you can save a copy of the strategy and unlock it so there is no longer any XML code in the script. (Strategy Builder > General. See attached picture.) To improve backtesting speeds, please refer to the IsInstantiatedOnEachOptimizationIteration documentation linked above.
Please let me know if I can be of further assistance.1 Photo
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
83 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
47 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
66 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment