![]() |
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 |
|
Senior Member
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
|
I must admit, it's been quite awhile since I've used the Strategy Analyzer, as I like to use Market Replay to run my strategies on so that I may watch the market unfold. Now however, I would like to use the Strategy Analyzer again to save some time, but I can't seem to get it to show any trades.
I ran it for yesterday and it showed in the status bar of the control panel that it was running the backtest, but no results. However, when I run the same strategy in Market Replay for yesterday it shows trades. I checked the dates and trading symbol in the backtest settings and they are correct. Could you suggest something else I could check? Thanks, Safetrading |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2010
Location: Denver, CO
Posts: 935
Thanks: 49
Thanked 79 times in 77 posts
|
Hello Safetrading,
Thank you for your note. Does your strategy incorporate the use of ATM Strategies to manage the position? When you run the Strategy Analyzer is there any item in the Orders tab?
Cameron
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
|
No transactions appear in the orders tab andf no, I'm not using any ATM strategies in my strategy, although I have my "SetStopLoss" in the OnBarUpdate rather than in the Initialize section.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi SafeTrading,
The next step here is to debug your strategy, by printing to confirm values and follow code flow. Use TraceOrders output to check for messages related to strategy order submission. See here for more info on Debugging your NinjaScript code. It may also help to add drawing objects to your chart for signal and condition confirmation - Drawing Objects.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
|
I'm happy to look for my own errors, but as I mentioned previously, the strategy worked in Market Replay for the same day. I was under the assumption that if the strategy worked without errors during Market Replay, that it should also work in the Strategy Analyzer for a back test. Is this assumption incorrect?
Thanks, Safetrading Quote:
|
|
|
|
|
|
|
#6 | |
|
Senior Member
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,184
Thanks: 178
Thanked 301 times in 259 posts
|
Quote:
Are you doing anything special in your strategy? |
|
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I am new and I do apologize if this was already talked about and I missed it. I am trying to back test a strategy that will buy 5 ES contract in 2 separate orders (Signal Name: Long3 and Long2). The reason is that I would like to get a profit target for 3 of the contracts and let the other 2 continue until other conditions present themselves. The Strategy Analyzer does execute the Long3 but not the Long2. I have also tried using a different set in the Edit Strategy Console to try and get this scenario to work. However either way (Enter Long3 and Long2 in the same set or 2 different sets), only Long3 executes during the backtest and not Long2. Is there any known reason for this? Thanks in Advance. Anthony |
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Aug 2010
Location: Denver, CO
Posts: 935
Thanks: 49
Thanked 79 times in 77 posts
|
Hello Anthony,
Thank you for your note. Could you provide a sample of your code for when Long3 and Long2 are supposed to enter the market?
Cameron
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| newbie back test ? | bitdoger | Strategy Analyzer | 1 | 10-13-2011 08:42 AM |
| Back Test ETFs | pistolpete | Connecting | 2 | 01-14-2010 05:51 AM |
| Is there any way that I can make a back test? | atrader | Strategy Development | 2 | 10-27-2009 08:05 AM |
| Peculiar difference between live test and back test | Mike_D | Strategy Development | 3 | 03-02-2009 03:51 PM |
| back test | latkinso | Automated Trading | 5 | 05-18-2007 11:58 AM |