NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 03-17-2011, 09:12 PM   #1
sajosh
Member
 
Join Date: Mar 2011
Posts: 55
Thanks: 1
Thanked 1 time in 1 post
Default Can multiple time frames be optimized?

Can multiple time frames be optimized? Or is optimization only available through the wizard? In other words, can optimization capabilities be coded?
sajosh is offline  
Reply With Quote
Old 03-18-2011, 03:16 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

sajosh, you could optimize the base time series used in the Strategy Analyzer > optimize DataSeries set to 'true'.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 03-18-2011, 06:40 AM   #3
sajosh
Member
 
Join Date: Mar 2011
Posts: 55
Thanks: 1
Thanked 1 time in 1 post
Default

Let's say I have two variables for two time frames each (so 4 variables total) that need to be optimized. (Not just the base time frame) How can I do that?

The 4 variables don't appear in the Optimize slide out bar. Why?

I put the variables in the #region Variables section. I'm using NT7.
sajosh is offline  
Reply With Quote
Old 03-18-2011, 06:47 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Only user inputs (the public properties of your variables) would appear in the SA optimizer - http://www.ninjatrader.com/support/f...ead.php?t=5782

Adding to the list of timeframes to optimize is unfortunately not supported directly - you can look into adding a couple of different frames and then adaptively switching the BarsInProgress used in your code.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 03-18-2011, 07:45 AM   #5
sajosh
Member
 
Join Date: Mar 2011
Posts: 55
Thanks: 1
Thanked 1 time in 1 post
Default

Yes, that worked, thanks!

Note for future reads: in http://www.ninjatrader.com/support/f...ead.php?t=5782 notice the difference between Period and lower case period, in line 6. It's explained here http://www.ninjatrader.com/support/f...rsive+property
sajosh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Time Frames In One Window maxreturn Charting 2 08-31-2010 02:12 PM
Multiple time frames? Trader61 Strategy Development 1 11-12-2009 04:13 AM
multiple time frames frogzillafx Indicator Development 1 12-08-2008 07:34 AM
Dynamic Multiple Time Frames? mazachan Strategy Development 3 11-21-2008 05:09 AM
Multiple time frames Oli Charting 4 06-26-2008 02:11 AM


All times are GMT -6. The time now is 12:14 AM.