NinjaTrader Genetic Optimizer - NinjaTrader Programming | futures io social day trading
futures io futures trading


NinjaTrader Genetic Optimizer
Updated: Views / Replies:54,063 / 197
Created: by piersh Attachments:19

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 19  
 
Thread Tools Search this Thread
 

NinjaTrader Genetic Optimizer

  #151 (permalink)
Just starting out...
Missouri, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, AmiBroker
 
Posts: 2 since Jun 2009
Thanks: 3 given, 1 received

I'm getting this error as the optimizer starts on one strategy:

There are no optimization results available, since the strategy has no parameters to optimize.
GSPC: PH Genetic Optimizer Start @ 5/1/2010 3:10:06 PM, combinations: 0
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at NinjaTrader.Strategy.PH.PHGenetic.Optimize()

The strategy has a boolean param as the first one in the property list. That boolean comes up in the PH optimizer list of potential enums to optimize on. If I leave everything unchecked there, I get the above error. If I check true, I don't see the error, and the optimization completes just fine.

I can duplicate this every time, and even after restarting NT 7 B15 32-bit.

Attached Thumbnails
NinjaTrader Genetic Optimizer-params.png  
Reply With Quote
 
  #152 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


Anagoge View Post
That boolean comes up in the PH optimizer list of potential enums to optimize on. If I leave everything unchecked there, I get the above error.

yes, sorry, that's a UI issue - it shouldn't let you uncheck all of the options for a bool/enum parameter. the number of combinations is zero because you're telling the optimizer that your bool can neither be true nor false. the error is correct, however the UI shouldn't allow you to get into that state...

please make sure that you check one or more values for each of the parameters listed in the dialog.

Reply With Quote
 
  #153 (permalink)
Elite Member
Belgium
 
Futures Experience: Intermediate
Platform: NinjaTrader , ThinkOrSwim
Broker/Data: Zen-Fire
Favorite Futures: futures
 
Posts: 1 since Feb 2010
Thanks: 0 given, 0 received


Hi ,

first thanks you very much for all of that wonderful work...

I'm an analyst programmer in ?NEt and I already wrote some genetics algorithm (not in the trading stuff) and I know how it's difficult to write that.

I just begin to test your Optimizer , do you use some 'cross over' evolution between genomes ?

There are other research algorithm that I used before...

I compared solutions between Genetics optimizations (GO) and Ant Colony optimizations (ACO)...

and I often found best solutions quicker with ACO...

I wrote a framework in C# to develop my research...

I would try to move it to try on Ninja Trader...

Can you give me somes links about the API and some tips to avoid loosing to much time

Of course , If I succeed in that developpment , I will post the solution here

thanks again for your contribution !!!

Reply With Quote
 
  #154 (permalink)
Elite Member
Michigan
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker/Data: MB Trading
Favorite Futures: Forex
 
TraderDJB's Avatar
 
Posts: 46 since Jan 2010
Thanks: 7 given, 28 received

@ Trumumflu: If you posted the source to your C# ACO work, we could help implement it.

On longer optimizations it is easy to get distracted with other things on my computer, and then discover that the optimization finished 5-10 minutes ago and I didn't notice. So, I added sound notification to the Genetic and Stochastic (version 1.12).

While it doesn't have a toggle for the sound, I hope that piersh will keep it in future versions and perhaps add the toggle for those of us that want that feature.

- TFX/DJB

Do or do not, there is no try. - Yoda
Attached Files
Register to download File Type: zip PHGenetic_v1.12_DJBSound.zip (18.3 KB, 31 views)
Reply With Quote
The following 3 users say Thank You to TraderDJB for this post:
 
  #155 (permalink)
Elite Member
Michigan
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker/Data: MB Trading
Favorite Futures: Forex
 
TraderDJB's Avatar
 
Posts: 46 since Jan 2010
Thanks: 7 given, 28 received

Here are some more changes and one bug fix (that was present in 1.12):

PH Genetic/Stochastic:
  1. Emit sound when optimizations run to completion, but not when optimization was aborted.
  2. Options box is now re-sizeable, larger by default, and is reformatted to not have as much empty space.
  3. Fixed: It used to be that hitting the Cancel button for Stochastics type would indefinitely hang NT without aborting the optimization.

Do or do not, there is no try. - Yoda
Attached Files
Register to download File Type: zip PHGenetic_v1.12_2_DJBSound.zip (18.0 KB, 19 views)
Reply With Quote
The following user says Thank You to TraderDJB for this post:
 
  #156 (permalink)
Elite Member
Cape Town, South Africa
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Zen-fire
Favorite Futures: EUR/USD
 
Posts: 40 since Aug 2009
Thanks: 22 given, 11 received

Controlling the number of trades

Is there a way that an enum could be used to control the minimum and maximum number of trades? Controlling the minimum number of trades is more important for me - otherwise my systems (before I include a stoploss only trades once)

I would also appreciate it if the parameter values printed to the output window could have more decimals as described here https://futures.io/37546-post150.html

Verge

Reply With Quote
 
  #157 (permalink)
Elite Member
Michigan
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker/Data: MB Trading
Favorite Futures: Forex
 
TraderDJB's Avatar
 
Posts: 46 since Jan 2010
Thanks: 7 given, 28 received

Verge, here I changed it as you requested to display up to 5 decimal places if it's a double or a long type value. See the screenshot. Also, I fixed the window box being really narrow if there weren't any enum types to optimize (I had made the window size resizeable but hadn't set a very big 'minimum' size to it.) The only bugger is that it does still make the sound even when aborting, where last night it wasn't. Oh well.

As for minimum trades or maximum trades, what you'd want to do is create a custom optimization type (as opposed to Max Profit Factor, etc.) that favors the number of trades to the number that you want. Setting the optimizer to discard results of less than a certain number will likely not produce the results that you are expecting and not function properly.

- DJB/TSX

Do or do not, there is no try. - Yoda
Attached Thumbnails
NinjaTrader Genetic Optimizer-capture.jpg  
Attached Files
Register to download File Type: zip PHGenetic_v1.12_3_DJBSound.zip (18.0 KB, 16 views)
Reply With Quote
The following 2 users say Thank You to TraderDJB for this post:
 
  #158 (permalink)
Elite Member
Michigan
 
Futures Experience: Intermediate
Platform: NinjaTrader, TradeStation, Thinkorswim
Broker/Data: MB Trading
Favorite Futures: Forex
 
TraderDJB's Avatar
 
Posts: 46 since Jan 2010
Thanks: 7 given, 28 received

Here's another update: Now it correctly only does the "Cha ching!" sound when it runs to completion and not when an optimization is aborted. Also, the dialogue box that pops up automatically sizes to the number of options available. (though it won't get smaller again after doing a strategy with lots of options, it seems to be the way NT handles it, until a restart.)

- DJB/TFX

Do or do not, there is no try. - Yoda
Attached Files
Register to download File Type: zip PHGenetic_v1.12_4_DJBSound.zip (18.1 KB, 64 views)
Reply With Quote
The following 2 users say Thank You to TraderDJB for this post:
 
  #159 (permalink)
Elite Member
Cape Town, South Africa
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Zen-fire
Favorite Futures: EUR/USD
 
Posts: 40 since Aug 2009
Thanks: 22 given, 11 received

please confirm correct version

Thank you traderfx!

To confirm - I checked the info.xml file of PHGenetic_v1.12_4_DJBSound.zip - it says version <Version>6.5.1000.11</Version> which I assume is incorrect. I assume you made your updates to version 6.5.1000.12 - it may actually be that the actual version 12's info file was not updated.

Edit - I checked - the info file of version 12 in the download section also says version 11.

Reply With Quote
 
  #160 (permalink)
Elite Member
Cape Town, South Africa
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Zen-fire
Favorite Futures: EUR/USD
 
Posts: 40 since Aug 2009
Thanks: 22 given, 11 received

5 decimals places works!



TraderFX View Post
Verge, here I changed it as you requested to display up to 5 decimal places if it's a double or a long type value. See the screenshot. Also, I fixed the window box being really narrow if there weren't any enum types to optimize (I had made the window size resizeable but hadn't set a very big 'minimum' size to it.) The only bugger is that it does still make the sound even when aborting, where last night it wasn't. Oh well.

As for minimum trades or maximum trades, what you'd want to do is create a custom optimization type (as opposed to Max Profit Factor, etc.) that favors the number of trades to the number that you want. Setting the optimizer to discard results of less than a certain number will likely not produce the results that you are expecting and not function properly.

- DJB/TSX

The 5 decimal places works great.

I have used the MOGO GO with NT6.5 - and liked it a lot. It has a setting that could be used to set the minimum number of trades. I used it because one of the optimization functions I use is "maximum profit factor". If I cannot cannot specify the minimum number of trades the result of the optimization often is 1 trade only - with a max profit factor of 99 (I do not use close at end of session).

The reason for the maximum number of trades are I would like a system to trade around twice a day (for example). I am unfortunately not skilled enough in C# to write an optimization function to control this.

Any suggestions from anyone on how I can achieve the above will be appreciated.

Reply With Quote

Reply



futures io > > > > > NinjaTrader Genetic Optimizer

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
MoGo Genetic Optimizer for NT7 TraderDJB NinjaTrader Programming 6 April 19th, 2012 09:52 AM
Index to Genetic Optimizers for NinjaTrader jdfagan NinjaTrader Programming 2 June 24th, 2010 06:09 AM
NinjaTrader 7.0 Strategy Analyzer and Optimizer tutorials? sev888 Traders Hideout 3 April 2nd, 2010 10:42 AM
How i use genetic optimizer in 10 steps wh NinjaTrader 6 June 15th, 2009 03:23 PM


All times are GMT -4. The time now is 04:54 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.90.92.204