![]() |
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
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2006
Location: , ,
Posts: 68
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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! |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,694
Thanks: 116
Thanked 192 times in 187 posts
|
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.
Patrick H.
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,694
Thanks: 116
Thanked 192 times in 187 posts
|
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.
Patrick H.
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
Yes, it is finally working.
Thanks. |
|
|
|
|
|
#8 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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.
|
|
|
|
|
|
#9 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,694
Thanks: 116
Thanked 192 times in 187 posts
|
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.
Patrick H.
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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.
|
|
|
|
|
|
#12 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
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
Last edited by ldissinger; 08-17-2012 at 04:06 PM.
|
|
|
|
|
|
#13 |
|
NinjaTrader Customer Service
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 1,694
Thanks: 116
Thanked 192 times in 187 posts
|
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.
Patrick H.
NinjaTrader Customer Service |
|
|
|
|
|
#14 |
|
Member
Join Date: Nov 2010
Posts: 48
Thanks: 0
Thanked 1 time in 1 post
|
It is all good now....
Thanks. Leroy |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Aug 2011
Posts: 16
Thanks: 0
Thanked 0 times in 0 posts
|
I have a MA strategy on better renko.
Is it doable to optimize on parameters of both MA and better renko bar? Thanks. lcy1031 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |