NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Strategy Analyzer

Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer.

Reply
 
Thread Tools Display Modes
Old 07-31-2009, 05:49 AM   #1
Widgetman
Member
 
Join Date: May 2006
Location: , ,
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
Default Strategy Analyzer

Hi,
Is there a way to back test an existing strategy ? I did not see that option in the menus, but I am new at this. I would like to run some of the gentic optimizers others were so kind to share.
Thanks
Widgetman is offline  
Reply With Quote
Old 07-31-2009, 05:57 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,395
Thanks: 252
Thanked 968 times in 951 posts
Default

Widgetman, just open the Strategy Analyzer and right click on the market you wish to test on and the select either BackTest / Optimize / WalkForward as test procedure - http://www.ninjatrader-support.com/H...AStrategy.html

In upcoming backtest properties window you can then select which strategy to run.
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 08-17-2012, 01:41 PM   #3
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default No backtest/optimize/walkforward window

When create the strategy analyzer window....it comes up normally. If I select a "futures" contract it displays it in the chart windows.

If I follow the directions for optimization, I right click on the contract and then click optimize. When I do this, a little tiny tab on the right says optimize, but there is no options for setting anything, it is just a tab.

Same for the other two options.


Any ideas.

P.S. Can you use hybrid renko bars or third party bars in doing an optimize session....if I ever have an opportunity to use it!
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 02:02 PM   #4
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,660
Thanks: 113
Thanked 187 times in 182 posts
Default

Hello idissinger,

Thank you for your post.

When you right click on the instrument > select Backtest > what strategy is listed in the Strategy drop down menu? If you select the SampleMACrossOver do you see the settings?

And you can use custom bar types in Backtests as well.

I look forward to assisting you further.
Attached Images
File Type: jpg SAnalyzerStrategyMenu.jpg (216.6 KB, 8 views)
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 08-17-2012, 02:44 PM   #5
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default Took me a while to figure it out.

I have some code on the machine that was causing the issue (not my code), but I fixed it and now it displays the optimizer panel.

Thanks.

P.S. It won't run the optimizer because of the message that there is nothing to optimize, but I'll read a few posts to see if I can find the reason for this.

Thanks,

Leroy
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 02:53 PM   #6
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,660
Thanks: 113
Thanked 187 times in 182 posts
Default

Hello Leroy,

Thank you for your response.

Do you have historical data for the instrument you are trying to optimize your strategy on?

You can check this by going to the NinjaTrader Control Center > Tools > Historical Data Manager > Edit > left click on the '+' next to the instrument you wish to test > left click on the '+' next to Last > and then the '+' next to the interval type you are using.

I look forward to assisting you further.
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 08-17-2012, 03:08 PM   #7
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default

Yes, it is finally working.


Thanks.
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 03:12 PM   #8
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default Multiple CPUs

It is too bad that you do not utilize all of the processors when doing the optimization. It would be done on my machine 8 times faster.

Maybe you are using multiple CPUs.....it seems that the output is garbled....so it may be using multiple processors.

Leroy
Last edited by ldissinger; 08-17-2012 at 03:29 PM.
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 03:18 PM   #9
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default Only one result

Patrick,

Is there something special a strategy has to do when the last date has passed....so that everything is reset to a good value for the next pass?

Do internal variables need to be initialized in the "Initialize" method when doing optimization?

I only get one result after running for 11:00 and it had a lot to do. I told it to save 100 results just for fun.


Leroy
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 03:36 PM   #10
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,660
Thanks: 113
Thanked 187 times in 182 posts
Default

Hello Leroy,

Thank you for your response.

NinjaTrader 7 has optimized multi core/multi-processor support. This would allow you to make full usage of multi-core/ multi-processor hardware on backtesting multiple instruments or running multiple iterations of a strategy optimization at the same time.

However due to the nature of the Window OS, NinjaTrader 7 would not be able to fully use all available multi-cores/multi-processors at any given time.

There should be no need to do anything special for your strategy when running the optimizer in NinjaTrader.

So I may investigate this matter further please test the optimization on the SampleMaCrossOver with the same settings as you strategy, if you get the same results please respond with a screenshot of your Optimization settings.

I look forward to assisting you further.
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 08-17-2012, 03:41 PM   #11
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default

Riddle me this....why do I only get one result.

When I run it from a chart....it trades clear up to and including the last bar. In the strategy optimizer, it stops early....very near the beginning of the data and I only get one result. Therefore, I'm guessing the that the rest of the runs are doing nothing.

When my current run is done 23 minutes....but I'm pretty sure only one result there too.

I'm using Hybrid Renko bars....special type of bar.


I will try it with the SimpleMACrossOver and we shall see, but that strategy is really simple which is good, but if you are maintaining variables and not just switching directions....something different may happen.



I'm maintaining IOrder objects and utilize Strategy.Positions to do some things, so it is vastly different......I'll let you know.
Last edited by ldissinger; 08-17-2012 at 03:49 PM.
ldissinger is offline  
Reply With Quote
Old 08-17-2012, 04:03 PM   #12
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default Just one result

Yes, multiple results with anaylzer.

But the strategy I'm running does not complete in the strategy analyzer....to the end as it does in chart mode....so it is difficult to figure out.

Leroy
Attached Images
File Type: bmp OneResult.bmp (164.1 KB, 2 views)
Last edited by ldissinger; 08-17-2012 at 04:06 PM.
ldissinger is offline  
Reply With Quote
Old 08-20-2012, 07:03 AM   #13
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,660
Thanks: 113
Thanked 187 times in 182 posts
Default

Hello Leroy,

Thank you for your response.

If you click on the Optimizer tab after running your Optimization do you see more than one result?

The screenshot you have provided shows the Instrument tab selected, if you have only ran the Optimization on one instrument than only one instrument will be shown on the Instrument tab.

I look forward to assisting you further.
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 08-20-2012, 09:50 AM   #14
ldissinger
Member
 
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
Default

It is all good now....

Thanks.

Leroy
ldissinger is offline  
Reply With Quote
Old 04-22-2013, 07:32 PM   #15
ccl3093
Junior Member
 
Join Date: Aug 2011
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
Default

I have a MA strategy on better renko.
Is it doable to optimize on parameters of both MA and better renko bar?

Thanks.

lcy1031
ccl3093 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
Correct strategy not being selected in strategy analyzer verge Suggestions And Feedback 1 11-12-2008 06:13 AM
Create a strategy analyzer for new strategy toyogo00 Strategy Analyzer 1 04-22-2008 12:06 AM
Multi timeframe strategy charts in strategy analyzer JonesWooHoo Strategy Development 10 10-31-2007 05:13 AM
Strategy Analyzer Will Not Load Strategy KBJ Strategy Development 4 09-14-2007 12:49 PM
No Strategy Analyzer BradB Miscellaneous Support 2 04-10-2007 10:08 AM


All times are GMT -6. The time now is 04:42 AM.