Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 PhotoJimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by tkaboris, Today, 05:13 PM
|
0 responses
2 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,281 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
9 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
Comment