PDA

View Full Version : Strategy Analyzer not working?


mazachan
07-10-2007, 03:22 PM
I tried using the Strategy Analyzer and when I run it, the analyzer does nothing. I do not see any trades show up even though I have debugging statements that prints out in the output window before the trades are being executed. Any idea on what would cause it to not work?

Thanks

NinjaTrader_Ray
07-10-2007, 05:15 PM
How about enabling TraceOrders in your strategy to see if you can tell what may be happening?

http://www.ninjatrader-support.com/HelpGuideV6/TraceOrders.html

Also, check the Control Center log tab for any errors generated by your strategy.

mazachan
07-10-2007, 05:55 PM
I set TraceOrders = true and there were no changes in the output windows. There are also no errors in the log. According to my debug statements, there should have been a bunch of trades, and yet the summary all reads 0, there are no executions, no trades, no orders.
I am also using Zen Fire and according to the graph, Zen Fire supports historical data. I am also not checking for Historical either.

And the strategy does work because it has been running in real time without any problems.

NinjaTrader_Ray
07-10-2007, 07:07 PM
How about adding adding something like:

Print(Time[0].ToString());

as the first line in the OnBarUpdate() method. Then backtest it --> You should see DateTime output in the Output window. If you do not, then you do not have any historical data while running a backtest.

mazachan
07-10-2007, 07:14 PM
Yes, I do have data as it has been printing out the market open and close times. I just tried this and it has historical data going all the way back to march for the ES 09-07.

Could it be that I am executing an ATM strategy as opposed to simple longs and shorts? Has anyone else had any issues like this? I tried this on another computer and I still get the same result.

I have attached 2 screenshots from the strategy analyzer after running the back test. There are no warnings or errors under the log tab.

I tried running the back test with the SampleMACrossOver strategy and that appears to work fine. However the SampleAtmStrategy produces the same results.

NinjaTrader_Ray
07-10-2007, 07:32 PM
ATM strategies are not backtestable, that is why you are not seeing any results. Thanks for pointing this fact out, I overlooked that.