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
The strategy must have at least one parameter to optimize
Collapse
X
-
The strategy must have at least one parameter to optimize
When I try to optimize one of my strategies in NT8, I get this error. The strategy has 31 parameters and I am trying to do genetic optimization. What I've found is that I can change 2 of the parameters from 3;20;1 to 3;10;1 and the optimization will run fine without throwing the error: "The strategy must have at least one parameter to optimize". It appears that it's hitting some kind of maximum combinations limit, however I don't see how that would be the case since I am doing genetic optimization. Please help. -
Hello rburton5403,
Thank you for your post and welcome to the NinjaTrader Support Forum!
You should not have any problem optimizing a range that large or even larger. Can you send us your log and trace files by going to Help > Email Support?
If so please note 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.
I look forward to assisting you further.
-
See the attached example code to repro the issue. Included in the zip also is LotsOfParameters.xml, which is the template settings for the strategy.Attached Files
Comment
-
All the parameters should be set to 0;1;1. Attached is the template file.Attached Files
Comment
-
Same issue, GO only
PatrickH,
I am experiencing a similar issue. I ran the strategy tester, no issues; now I try to run the Genetic Optimization algorithm against a single FX pair & Max Net Profit (or other singular metric), but the error window pops up stating the optimizer needs a parameter to optimize.
Event occurs with only open 1 variable or all 17 in my strategy to be optimized. If i switch it to the Standard (full permutation) algorithm, it works fine, but would take more than a year to complete.
Computer Specs:
--Windows 10 Pro, all current updates installed
--Windows Update forced into 'notify' mode, restart disabled
--16 Gb Ram & AMD Quad 3.2 Ghz Processor
--CAT6A to broadband router
--Only a browser running in the background, all other tray & background applications closed / disabled for testing
Event occurred with NT 8.0.3.1 (64 bit), and persists after the new NT 8.0.4.0 (64 bit) build.
Event persists while connected to brokerage account (simulation on), or to NT simulation account, or when Strategy Analyzer->Properties are set to Use Local Data Only & Internet connectivity is disabled.
Custom Strategy:
--Calls 4 custom indicators & 2 standard indicators.
--Backtests Completed & Optimization Attempted on Tick & Range Bars with High Order Fill (3 Tick); same behavior on 1 Minute Standard Candlesticks & Standard Order Fill.
--IsInstantiatedOnEachOptimizationIteration = true.
--IncludeTradeHistoryInBacktest = false.
--No user defined ENUM or BOOL values are required.
GO Strategy Analyzer still triggers Error Message ... so I performed the following actions (using local data only property checked) and restarted the computer after each action:
--Changed the file / class / display name of the strategy (no change)
--Deleted and reloaded 3yr of Bid/Ask/Last Tick Data for interested Instrument (no change)
--Reset Database / Commission / Risk profiles (no change)
--Deleted all TMP & Cache files (no change)
--Renamed NinjaTrader.sdf --> OLD_NinjaTrader.sdf according to <THREAD> (no change)
This is the second occurrence for me in the past month ...
For the first occurrence (NT 8.0.3.1), I had to remove all my custom indicators / strategies, uninstall NT, PC restart, reinstall NT, then add my custom indicators / strategies back in ... and the GO algorithm worked (for about 3 passes).
Now, I'm back where I started and the GO triggers the parameter error popup ... Except, this error doesn't occur when running any of the Optimizations as Standard ... very odd.
So, I installed the new patch & tried it all again (no change). I need to use the tool repeatedly each week and an uninstall / reinstall protocol is not practical for just a couple passes. Perhaps I'm doing something wrong, but I can't figure it out.
I've scrubbed my personal / account / brokerage information (replaced with "XXXXXXXXXX") and attached the following files: LOG, TRACE, GO Template...
Any help you might be able to provide will be greatly appreciated.
Best Regards, Mike
Comment
-
Hello helderbm,
Thank you for your post.
As of Release 4 on NinjaTrader 8 this should have been resolved. Can you send us your log and trace files by going to Help > Email Support?
If so please note 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.
I look forward to assisting you further.
Comment
-
Same with diferent versions.
So i decided to take a look at the GeneticOptimizer code, and found the problem.
Here is a quick fix for people with the same problem.
int wantedIterations = Generations * GenerationSize;
//long possibleIterations = GetParametersCombinationsCount(Strategies[0]);
long possibleIterations = wantedIterations;Last edited by helderbm; 04-20-2017, 09:57 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Today, 03:49 AM
|
0 responses
7 views
0 likes
|
Last Post
by PaulMohn
Today, 03:49 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
1 response
9 views
0 likes
|
Last Post Today, 02:18 AM | ||
Started by rocketman7, Today, 02:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
4 views
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 12:32 AM |
Comment