NexusFi: Find Your Edge


Home Menu

 





NinjaTrader Genetic Optimizer


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one piersh with 49 posts (94 thanks)
    2. looks_two Big Mike with 26 posts (10 thanks)
    3. looks_3 TraderDJB with 13 posts (18 thanks)
    4. looks_4 dsraider with 10 posts (0 thanks)
      Best Posters
    1. looks_one piersh with 1.9 thanks per post
    2. looks_two TraderDJB with 1.4 thanks per post
    3. looks_3 sam028 with 0.5 thanks per post
    4. looks_4 Big Mike with 0.4 thanks per post
    1. trending_up 93,219 views
    2. thumb_up 134 thanks given
    3. group 47 followers
    1. forum 197 posts
    2. attach_file 19 attachments




 
Search this Thread

NinjaTrader Genetic Optimizer

  #181 (permalink)
 
jdfagan's Avatar
 jdfagan 
Pacifica, CA
 
Experience: Advanced
Platform: AmiBroker, TradeStation, NinjaTrader
Broker: Options House
Trading: Futures, Stocks
Posts: 34 since Jun 2009
Thanks Given: 68
Thanks Received: 44


ZTR View Post
The site states:
The source code is also free for anyone to download. Note that even though NinjaTrader/MoGo are both .NET 2.0 apps, the MoGo source code and solution require Visual Studio 2008 due to the use of C# 3.0-specific language features.

Have any idea if it works for later versions of Visual Studio? (asking as I have VS2010) and have you tried it with NT7? (as I don't use 6.5).

I have VS 2010 and I have converted the project (easy enough by just opening a VS 2008 project from within VS 2010 and it will convert it for you). I know TraderDJB made an attempt at making it work with NT 7 but I haven't had time yet to review to see if I can help. I hope to free up some time in July after the holidays.

JD

Follow me on Twitter Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #182 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

Hi

There are various ways to optimize. This is from:

NT7 Features & Development Status

Optimization Enhancements

- Added "Genetic" optimization in addition to the default brute force optimization
- Added support for optimization on "max. sharpe ratio"
- Added support for optimization on "max. probability"

Of course there is maximum profit factor, etc.

I have also read:

Expectancy Score

which is here:

URC Trading - [AUTOLINK]Expectancy[/AUTOLINK] Score vs Sharpe Ratio

So is there a consensus among profitable traders to optimize to...maybe...Expectancy Score?

- Stephen

Reply With Quote
  #183 (permalink)
 
TraderDJB's Avatar
 TraderDJB 
Michigan
 
Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker: MB Trading
Trading: Forex
Posts: 46 since Jan 2010
Thanks Given: 7
Thanks Received: 28


I didn't see these later posts about the MoGo until now...

The fundamental problem with the MoGo optimizer to getting it from NT 6.5 to NT 7 is that it was built for a very strictly single-core environment and to change it to allow multi-core processing would need... significant re-engineering. (I took a further look at it today.) The new genetic optimizer that NT shipped with NT7 beta 18 is programmed much better and more efficiently than the MoGo and also clearer than PH Genetic though it is almost identical. It really should fill most optimization needs. I've worked to create a variant of NT's GO that is a default optimizer with enum support. Last week, I added the ability to output files that show every iteration run, like MoGo. (I plan to release this mod in a week or so, when I get the time to fix a last bug.)

The only thing left that the MoGo had that these don't is the ability for "parameter constraints" through I never used it long enough to know how that differed from the parameter constraints you normally select when running an optimization. If that was a highly desired trait, I would recommend pulling that specific feature and adding it to NT GO.

What prompted all this optimization programming is that for ALL the genetic optimizers in NT7, 10-15% of the iterations are randomly dropped and so results will be inconsistent even if you run optimizations where every single combination was supposed to be tried - which should produce the same result. I haven't reported this on the NT forum yet, but a workaround for now, is I changed the optimizers to run single core.

- DB

Do or do not, there is no try. - Yoda
Reply With Quote
Thanked by:
  #184 (permalink)
 Zoethecus 
United States of America
 
Experience: Advanced
Platform: NT
Posts: 1,145 since Aug 2009

Single core? Does that slow down the calculation process?

Reply With Quote
  #185 (permalink)
 
jdfagan's Avatar
 jdfagan 
Pacifica, CA
 
Experience: Advanced
Platform: AmiBroker, TradeStation, NinjaTrader
Broker: Options House
Trading: Futures, Stocks
Posts: 34 since Jun 2009
Thanks Given: 68
Thanks Received: 44


TraderDJB View Post
What prompted all this optimization programming is that for ALL the genetic optimizers in NT7, 10-15% of the iterations are randomly dropped and so results will be inconsistent even if you run optimizations where every single combination was supposed to be tried - which should produce the same result. I haven't reported this on the NT forum yet, but a workaround for now, is I changed the optimizers to run single core.

Doesn't the genetic search generally have the evolution usually start from a population of randomly generated individuals and happens in generations where the generations themselves introduce a random aspect (i.e., random mutations) from this initial core random starting population? I don't think subsequent GO runs are necessarily supposed to be identical due to these random aspects that genetic search algorithms make use of which are not really supposed to search the whole search space anyways.

Genetic algorithm - Wikipedia, the free encyclopedia

JD

Follow me on Twitter Reply With Quote
  #186 (permalink)
 
TraderDJB's Avatar
 TraderDJB 
Michigan
 
Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker: MB Trading
Trading: Forex
Posts: 46 since Jan 2010
Thanks Given: 7
Thanks Received: 28

@ Zoethecus: Yes, a bit.

@ jdfagan: If the number of combinations possible is larger than the generation size * generations then different results are expected. However, I've tracked results being generated to be tested and then the results not properly captured, even on optimizations of generation size 300, 1 generation and 100 possible combinations so that all were instantly tried. There are duplicate results entry parameters where the parameters going in were not duplicates - in fact, the coding specifically eliminates any redundant trials.

Do or do not, there is no try. - Yoda
Reply With Quote
Thanked by:
  #187 (permalink)
 
jdfagan's Avatar
 jdfagan 
Pacifica, CA
 
Experience: Advanced
Platform: AmiBroker, TradeStation, NinjaTrader
Broker: Options House
Trading: Futures, Stocks
Posts: 34 since Jun 2009
Thanks Given: 68
Thanks Received: 44


TraderDJB View Post
@ Zoethecus: Yes, a bit.

@ jdfagan: If the number of combinations possible is larger than the generation size * generations then different results are expected. However, I've tracked results being generated to be tested and then the results not properly captured, even on optimizations of generation size 300, 1 generation and 100 possible combinations so that all were instantly tried. There are duplicate results entry parameters where the parameters going in were not duplicates - in fact, the coding specifically eliminates any redundant trials.

Cool. Thanks for the detailed explanation! So it does sound like the NT GO is still not quite right/efficient if its re-submitting backtests that have been previously run in any prior generation.

JD

Follow me on Twitter Reply With Quote
  #188 (permalink)
 
TraderDJB's Avatar
 TraderDJB 
Michigan
 
Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker: MB Trading
Trading: Forex
Posts: 46 since Jan 2010
Thanks Given: 7
Thanks Received: 28

Unfortunately, this seems to be a deeper NT bug, because it affects all the genetic optimizers, including PH Genetic.

Do or do not, there is no try. - Yoda
Reply With Quote
  #189 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,469 since Jun 2009
Thanks Given: 33,246
Thanks Received: 101,669

One major limitation with NT's implementation was the inability to optimize boolean's and enum's. If they would fix that, it would be a significant improvement.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #190 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184



TraderDJB View Post
I didn't see these later posts about the MoGo until now...

... I've worked to create a variant of NT's GO that is a default optimizer with enum support. Last week, I added the ability to output files that show every iteration run, like MoGo. (I plan to release this mod in a week or so, when I get the time to fix a last bug.)...
I haven't reported this on the NT forum yet, but a workaround for now, is I changed the optimizers to run single core.

- DB

Greetings DB!

Thanks for all that you share here on futures.io (formerly BMT)! I do appreciate anything that helps, especially when it has to do with programming which is a real challenge for me.

When I saw this post (and reread it several times) I was in hopes that your 'mod' of the GO was about 'ready to GO [ok .. too punny .. but I couldnt help myself]' . I have been watching this space and have not seen anything new: will you be able to share the update in the nearer future?

Thanks again!

Jon

Reply With Quote




Last Updated on December 16, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts