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


NinjaTrader Genetic Optimizer
Updated: Views / Replies:54,008 / 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

  #101 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

Thanks for your response, piersh. Well, no matter what I do, I don't get the options on the right side (I'm on 6.5, by the way). As far as the int/doubles go, I get no options for them in either window. Did I forget something?

Reply With Quote
 
  #102 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


dsraider View Post
Thanks for your response, piersh. Well, no matter what I do, I don't get the options on the right side (I'm on 6.5, by the way). As far as the int/doubles go, I get no options for them in either window. Did I forget something?

do the properties in your strategy look like this?

 
Code
                            
        [Category ("Parameters")] 

        public 
PriceType PriceType 
        

            
get { return _priceType; } 
            
set _priceType value; } 
        } 
        
PriceType _priceType

Reply With Quote
 
  #103 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received


No, sir. I stared at page 7 of this thread for quite some time and tried to make my strat look like that. After a million error messages, I went to the enum link you posted but that didn't seem to do the trick. Maybe I just need an Enum for Dummies book? Sorry, I'm just not much of a coder yet, so the language doesn't come easily to me.

Reply With Quote
 
  #104 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


dsraider View Post
No, sir. I stared at page 7 of this thread for quite some time and tried to make my strat look like that. After a million error messages, I went to the enum link you posted but that didn't seem to do the trick. Maybe I just need an Enum for Dummies book? Sorry, I'm just not much of a coder yet, so the language doesn't come easily to me.

let's have a look. can you post your code here? you can strip out the code inside your Initialize/OnBarUpdate/etc. methods... i'm mostly interested in how you're declaring your properties.

Reply With Quote
 
  #105 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

I've removed this post so no one knows how dumb I am. Also, I didn't want anyone getting confused.


Last edited by dsraider; February 4th, 2010 at 07:57 PM.
Reply With Quote
 
  #106 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


dsraider View Post
Well, I tried copying the variables from the indicator into the strat, in order to manipulate them locally. I hope this is what you mean. I'm about two weeks into coding ninjascript:

Am I six or seven exits past what you meant?

well, in order for your strategy's varables to show up, you'll need to expose each one of them as properties.

for example:
 
Code
                            
        [Category ("Parameters")]  

        public 
SuperTrendMode TrendMode
        
{  
            
get { return smode; }  
            
set smodevalue; }  
        }  
        
SuperTrendMode smode SuperTrendMode.ATR

Reply With Quote
The following user says Thank You to piersh for this post:
 
  #107 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

Oh man, I'm like a 90-year-old guy trying to change the channels by clicking away at his cell phone.

Okay, TrendMode and MAs worked but it did NOT like my entering length, multiplier or the smoothing integer. My plan is to test all combos of Mode, MAs and lengths (1-20), multipliers (.1-5) and smooth (1-20) against targets and stops of say .25 - 12, just on a TSSuperTrend crossover. Maybe this isn't possible?

Thanks.

Reply With Quote
 
  #108 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received

You meant this, I assume?

#region Variables

private int length = 14;
private double multiplier = 1.5;
private int smooth = 14;

private int target = 2;
private int stop = 8;

[Category ("Parameters")]
public int Length
{
get { return length; }
set { length = Math.Max(1, value); }
}

[Category ("Parameters")]
public MovingAverageType MAType
{
get { return maType; }
set { maType= value; }
}
MovingAverageType maType = MovingAverageType.HMA;

[Category ("Parameters")]
public double Multiplier
{
get { return multiplier; }
set { multiplier = Math.Max(0.0001, value); }
}

[Category ("Parameters")]
public int Smooth
{
get { return smooth; }
set { smooth = Math.Max(1, value); }
}

[Category ("Parameters")]
public SuperTrendMode TrendMode
{
get { return smode; }
set { smode= value; }
}
SuperTrendMode smode = SuperTrendMode.ATR;

[Category ("Parameters")]
public int Target
{
get { return target; }
set { target = Math.Max(1, value); }
}

[Category ("Parameters")]
public int Stop
{
get { return stop; }
set { stop = Math.Max(1, value); }
}

#endregion

It compiles but doesn't show in the optimizer. I'll keep working on it but if you see something and want to save me some hair from falling out....?

Reply With Quote
 
  #109 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


dsraider View Post
You meant this, I assume?


It compiles but doesn't show in the optimizer. I'll keep working on it but if you see something and want to save me some hair from falling out....?

yes, that looks good. the 'int' & 'double' parameter won't show in the GA Optimizer dialog - you can set those in the usual place, in the Strategy Analyzer 'optimize' dialog.

Reply With Quote
 
  #110 (permalink)
Trading for Fun
New York, NY
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES
 
Posts: 142 since Dec 2009
Thanks: 41 given, 83 received


I actually couldn't get the strat to show at all but it turned out to be a typo on my part. Thank you for your explanation and tips. Everything now shows as it should.

Dave

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)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

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 08:43 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-10 in 0.12 seconds with 20 queries on phoenix via your IP 54.83.122.227