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 91,541 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

  #111 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Well, the strat seems to boot up fine in the optimizer but only the default one will actually optimize. Please see attached pics. Any thoughts?

Thanks.

UPDATE:
Output Window:
ES 03-10: PH Genetic Optimizer Start @ 2/6/2010 11:15:58 AM, combinations: 150,028,200,000
System.InvalidCastException: Specified cast is not valid.
at NinjaTrader.Strategy.Parameter.set_Value(Object value)
at NinjaTrader.Strategy.SetParameterDefinition`1.WriteValue(StrategyBase strategy, ParameterCollection rgParams, Int32 iValue)
at NinjaTrader.Strategy.ParameterDefinitions.WriteToStrategy(ParameterSet child, StrategyBase strategy, ParameterCollection rgParams)
at NinjaTrader.Strategy.PHOptimizationMethod.RunIteration(ParameterSet child)
at NinjaTrader.Strategy.PHOptimizationMethod.RunIterations[T](IEnumerable`1 rgChildren)
at NinjaTrader.Strategy.PHGenetic.ScoreGeneration(IEnumerable`1 rgChildren)
at NinjaTrader.Strategy.PHGenetic.Optimize()

Attached Thumbnails
Click image for larger version

Name:	op1.JPG
Views:	304
Size:	48.9 KB
ID:	7709   Click image for larger version

Name:	op2.JPG
Views:	204
Size:	30.9 KB
ID:	7710   Click image for larger version

Name:	op3.JPG
Views:	195
Size:	10.7 KB
ID:	7711  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #112 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Anyone? Bueller?

This is me, on my knees, single tear rolling down cheek, BEGGING for help.

Thanks,
Dave

P.S. My first pic above doesn't show parameter ranges, but only because I grabbed the pic when it initially booted up. I've tried many.

Reply With Quote
  #113 (permalink)
piersh
California
 
Posts: 87 since Jun 2009
Thanks Given: 5
Thanks Received: 120



dsraider View Post
Anyone? Bueller?

sorry for the delay. it looks like I introduced a bug which affects NT6.5. i'll try to fix it soon, unfortunately my NT box is having some problems

Reply With Quote
  #114 (permalink)
dsraider
New York, NY
 
Posts: 142 since Dec 2009
Thanks Given: 41
Thanks Received: 87

Thanks, piersh! It's the last part needed for my master plan (muahahaha).

Noooo idea what it could be, but if I can do anything to help, please let me know.

Dave

Reply With Quote
  #115 (permalink)
hjahend
holland
 
Posts: 5 since Sep 2009
Thanks Given: 2
Thanks Received: 0

Hi Piersch,

Imported your optimizer in NT7 and compiled it with F5. That was OK.

But the optimizer does not show up in the strategy selection window of NT7.
Do I do something wrong or is there another issue?

I noticed that according your scripting the relevant files are in the .../type area, is that a possible problem?

please advise
thanks,
Harry

Reply With Quote
  #116 (permalink)
sju10544
Goeppingen, Germany
 
Posts: 9 since Mar 2010
Thanks Given: 3
Thanks Received: 0

Hi Piersch,

tried to use your amazing optimizer tool. Unfortunately the first try failed. After starting the process I got the same error message like "dsraider".:


Quoting 
6E ##-##: PH Genetic Optimizer Start @ 3/6/2010 2:35:36 PM, combinations: 10,224
System.InvalidCastException: Die angegebene Umwandlung ist ungültig.
bei NinjaTrader.Strategy.Parameter.set_Value(Object value)
bei NinjaTrader.Strategy.SetParameterDefinition`1.WriteValue(StrategyBase strategy, ParameterCollection rgParams, Int32 iValue)
bei NinjaTrader.Strategy.ParameterDefinitions.WriteToStrategy(ParameterSet child, StrategyBase strategy, ParameterCollection rgParams)
bei NinjaTrader.Strategy.PHOptimizationMethod.RunIteration(ParameterSet child)
bei NinjaTrader.Strategy.PHOptimizationMethod.RunIterations[T](IEnumerable`1 rgChildren)
bei NinjaTrader.Strategy.PHGenetic.ScoreGeneration(IEnumerable`1 rgChildren)
bei NinjaTrader.Strategy.PHGenetic.Optimize()

Maybe it depends on NT 6.5 1000.14 ?

Would appreciate any help to run your tool.

Thanks and best regards.

Jens

Reply With Quote
  #117 (permalink)
 mmather 
lockport il
 
Experience: Beginner
Platform: ninja
Broker: td ameritrade
Trading: leveraged etf's
Posts: 3 since Feb 2010
Thanks Given: 7
Thanks Received: 0

When trying to import, it failed as Ninja says it has programming errors that must be resolved before it can be imported. What do I do now??

Reply With Quote
  #118 (permalink)
sju10544
Goeppingen, Germany
 
Posts: 9 since Mar 2010
Thanks Given: 3
Thanks Received: 0

Hi mmather,

to solve this issue you have to go to the Control Center, Tools, Edit Ninja Script, Indicator.
Then click on an indicator (no matter which one), click OK. Another window comes up. Then click F5.

If you don't have any other problems, then you should compile all the indicators and solve you error message.

Reply With Quote
  #119 (permalink)
 verge 
Cape Town, South Africa
 
Experience: Beginner
Platform: NinjaTrader
Broker: Zen-fire
Trading: EUR/USD
Posts: 41 since Aug 2009
Thanks Given: 22
Thanks Received: 12

I installed NT 6.5.1000.15 and then encountered the following problem:

Type\PHCommon.cs,
'NinjaTrader.Strategy.Strategy' does not contain a definition for 'LastPerformanceValue',CS0117 - click for info,858,54,

I then deleted PHcommon and PHgenetic - downloaded PHgeneticV1.09 again - and when I try to import it is says that the files that I am trying to import has a programing error.

I hope somene can help me with this proplem since I am stuck - and use PHgenetic as my optimizer

Verge

PS - the code specifically reads:

#if NT7
RunIteration (child.OnIterationComplete,
null);
#else
this.Strategy.RunIteration ();
// record the strategy's performance
child.Performance = NinjaTrader.Strategy.Strategy.LastPerformanceValue;
#endif

Reply With Quote
  #120 (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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534


verge,

When you upgrade NT 6.5.xxx to a new version it overwrites Strategy.cs. You have to re-overwrite it with the one included in the zip from piersh.

In other words, timeline:

NT 6.5.1000.14
Documents\NinjaTrader 6.5\bin\custom\Strategy\@Strategy.cs (native NT version)

Install Piersh GO
Documents.....\Strategy\@Strategy.cs (piersh version, overwrote NT version)

-- Everything working above --

Upgrade NT to 6.5.1000.15
Documents....\Strategy\@Strategy.cs (back to NT version, overwrote piersh version)

-- Now GO is broken --

Answer
Documents....\Strategy\@Strategy.cs (replace it again with Piersh version)

Mike

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




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