Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have written a strategy that optimizes stop levels and take profits, but it takes forever to optimize since I usually use the default optimizer. I'd like it to just skip a setting if the stop is larger than the take profit. Right now I have an if statement so that the algorithm enters the trade only if the stop is <= the take profit. Is there a way to do this where the code just exits? I'm not a professional programmer so I'm not clear on how to approach this and would like suggestions from some pros who know how to make code faster. Thanks.
Very good solution, thanks. That does make a lot of sense. Not sure why I didn't think of that LOL. I wish I could change the optimizer logic though. Maybe I'm being too ambitious.
I think that could be a neat solution, but I would change it.
Let's say you are optimizing profit1 from 1 to 20 and inc 1-19, now when profit1 is 2 and inc is 19 you have a stop value of -17...no good...
This ensures that you don't end up with a negative stop:
I guess you were originally talking about sth. like (depending on the rest of your calculations, this might well be faster...):
That would work, but will always include unneccessary runs as it will always work up to profit = maximum stop + maximum inc.
So if you want to run stop from 1-20 and profit also 1-20 it will in fact run up to profit = 39 ( stop 20 + inc 19).
Platform: "I trade, therefore, I AM!"; Theme Song: "Atomic Dog!"
Trading: EMD, 6J, ZB
Posts: 796 since Oct 2009
what about the other improvements?, such as turning off Windows Search (disable), or making the settings on your windows 7 or 8, SSD capable, hence making it take longer on some tasks, like File_Explorer, but faster within Ninja?
I find for me using the default setting in Ninjatrader Optimization is going to take me 10 to 50 times longer then the genetic settings. The results you get in the default should always be fairly close to what you come up with using the genetic settings unless your sampling to few trades over a long time period or very short periods in general.
I suggest forget the default and waiting 3 hours to 3 days for it to complete a complex optimization and do it in 3 to 30 minutes in the genetic mode.