![]() |
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 |
|
Junior Member
Join Date: Nov 2007
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
|
I'm in the process of developing an optimizer, the code compiles correctly but nothing is displayed in the strategy analyzer. The code isn't completely finished but it should be able to return at least one value. NT6 shows nothing and NT6.5 says that there is no info to display. The code is attached.
Thanks, Chris |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
I didn't examine your logic in any depth, but I'd do two things:
1) Check to make sure you're not getting a divide by zero (it looks likely -- did you look in the "Log" tab for errors?) 2) If still having troubles, try writing some intermediate results to a text file using C# I/O methods. Good luck. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2007
Location: Fairfax, VA
Posts: 216
Thanks: 0
Thanked 0 times in 0 posts
|
I'll take a quick look. Note you can use Strategy.Print() to write debug info to the output window.
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jul 2007
Location: Fairfax, VA
Posts: 216
Thanks: 0
Thanked 0 times in 0 posts
|
It returns results for me as expected (on 6.5 beta 4), but your logic doesn't make sense, in particular:
1. TWR *= HPR; TWR is always zero, so this value is always going to be zero. 2. This section: Loser = systemPerformance.ShortTrades.TradesPerformance.Gr ossLoss; largestLoser = systemPerformance.LongTrades.TradesPerformance.Gro ssLoss; if(largestLoser >Loser) { largestLoser = Loser; } The gross loss is the total of all losing trades, and it is a negative number. This logic is not going to do what you think. But I am not getting the no results message. KBJ is probably right about there being an exception. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NTMarketPosition suddenly returned a wrong value | BCA | Automated Trading | 45 | 05-22-2008 11:02 AM |
| Custom optimizer development feedback | Pete S | Historical NinjaTrader 6.5 Beta Threads | 2 | 02-14-2008 08:44 AM |
| New "Introduction to NinjaScript Strategy Development" 8 Hour Online Seminar! | NinjaTrader_Ray | News and Announcements | 0 | 12-05-2007 06:35 PM |
| Bug in Optimizer | NinjaTrader_Josh | Suggestions And Feedback | 5 | 05-29-2007 02:02 AM |
| Error returned | underground | Automated Trading | 0 | 06-10-2005 07:18 AM |