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 08-10-2012, 02:12 PM   #1
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default Back Test Assistance

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
safetrading is offline  
Reply With Quote
Old 08-10-2012, 02:33 PM   #2
NinjaTrader_Cameron
NinjaTrader Customer Service
 
NinjaTrader_Cameron's Avatar
 
Join Date: Aug 2010
Location: Denver, CO
Posts: 938
Thanks: 49
Thanked 80 times in 78 posts
Default

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?
NinjaTrader_Cameron is offline  
Reply With Quote
Old 08-10-2012, 02:57 PM   #3
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default reply

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.

Quote:
Originally Posted by NinjaTrader_Cameron View Post
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?
safetrading is offline  
Reply With Quote
Old 08-10-2012, 04:00 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

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.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 08-10-2012, 08:57 PM   #5
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default reply

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:
Originally Posted by NinjaTrader_RyanM View Post
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.
safetrading is offline  
Reply With Quote
Old 08-10-2012, 09:02 PM   #6
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,187
Thanks: 178
Thanked 301 times in 259 posts
Default

Quote:
Originally Posted by safetrading View Post
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
What time frames are you using in market replay that produces trades and the analyzer?

Are you doing anything special in your strategy?
sledge is offline  
Reply With Quote
Old 08-10-2012, 09:08 PM   #7
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

Quote:
Originally Posted by safetrading View Post
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
Not necessarily, replay is live data, backtest is historical data.
Radical is offline  
Reply With Quote
Old 08-13-2012, 06:19 AM   #8
sttsgs123
Junior Member
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default Edit Strategy Problem

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
sttsgs123 is offline  
Reply With Quote
Old 08-13-2012, 06:25 AM   #9
NinjaTrader_Cameron
NinjaTrader Customer Service
 
NinjaTrader_Cameron's Avatar
 
Join Date: Aug 2010
Location: Denver, CO
Posts: 938
Thanks: 49
Thanked 80 times in 78 posts
Default

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?
NinjaTrader_Cameron 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
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


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