![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Dec 2009
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I created my own strategy and would like to optimize it. I want to know how to create optimization paramters for the auto optmizer to pick up and test for me. Thanks, Sharkie |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Sharkie,
All you have to do is create a normal parameter for your strategy like how you would make any other parameter. You can see SampleMACrossOver for examples of parameters. Then when you are using the Strategy Analyzer, just choose Optimize and it will handle the rest in allowing you to select a range to use.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Dec 2009
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
|
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
No, add is only for adding indicators or bar objects. Please see SampleMACrossOver and see how they created the Fast and Slow parameters. Pay attention to the Variables region and Properties regions of the code.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Dec 2009
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
I tried and I still don't get Paramters to appear in the config table. this is the code I created which I expected should trigger the parameters table to show.Please let me know if there is anything more I should do
#region Properties [Description("MACD Long Signal Entry")] [Category("Parameters")] public double MACD_Long { get { return MACD_long; } set { MACD_long = Math.Max(1, value); } } /// <summary> /// </summary> [Description("MACD Long signal exit")] [Category("Parameters")] public double MACD_Long_Exit { get { return MACD_long_exit; } set { MACD_long_exit = Math.Max(1, value); } } #endregion |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
You need to pay special attention to what is capitalized and what is not. Notice how in the SMA indicator there are variables in the Properties region that are not capitalized and some that are. Notice how the uncapitalized ones have a corresponding line of code in the Variables region of the code.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Dec 2009
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
That is exactly what I did .First defined them in the Variables section and then using them in the Parameters section.Can I send you privatly the full code for you to review,I think I am missing out on something very simple here. This is the only think missing for me to start optimizing.
|
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
You can send in an email to support [at] ninjatrader [dot] com. Please be sure you put a link to this thread in the email along with Attn: Josh in it. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimization | skat100 | Automated Trading | 1 | 09-02-2009 07:18 AM |
| Error Log setting up parameters | stefy | Strategy Development | 1 | 06-23-2009 09:10 AM |
| When optimization is too much optimization | cunparis | Strategy Development | 2 | 11-28-2008 12:48 AM |
| Number of optimization parameters | Sidhartha | Strategy Development | 1 | 04-16-2008 12:01 PM |
| Setting EntryHandling || EntriesPerDirection From Program Overridden by BackTest Parameters | KBJ | Strategy Analyzer | 4 | 05-01-2007 07:24 AM |