![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 72
Thanks: 14
Thanked 0 times in 0 posts
|
I have imported historical data between the period 2003 - June 2009 and tried to do walk forward optimization and back testing. While the testing appears to be running and my walk forward optimization ran for about 4 hours, it gave '0' transactions and hence no profit or loss.
I am running the strategy on range charts and therefore had uploaded tick data. I checked the data using the Historical Manager -> Edit mode and data appears to be there. For example in ES 09-03 I have 'Last' data, but no 'Bid' and 'Ask' data. For range data I would presume 'last data' is adequate? Any ideas why I am not getting any results? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
|
Hello,
Yes, last data is all you need if that is what your strategy is running from. Can you please try this using one of the default strategies such as the SampleMACrossovers and test to see if you do not get any results for the same period. I look forward to assisting you further.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 72
Thanks: 14
Thanked 0 times in 0 posts
|
I tried running it on a couple of default strategies with the same result. It is not picking up any transactions
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
sandeshrai, can you please try with the automatic merge feature set to DoNotMerge for the ES master instrument under Tools > Instrument Manager. If you add continuous contract data to the system it would be to import it to the ES ##-## symbol (this is the continuous contract and not the individual one). Then create a regular range chart with your data and check if this is contructed ok, then apply the SampleMACrossOver here (if you dont have a connection, please simply use the External Feed to be able to apply a strategy to the chart in backtesting).
Thanks,
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 72
Thanks: 14
Thanked 0 times in 0 posts
|
I set the feature to 'Do Not Merge' and constructed a range chart. It chat is constructed fine. When I ran the 'SampleMACrossover" strategy it does show trades. When I back tested my strategy however, it does not show any trades.
My strategy does work on data for the current year (From Jan 1, 2011 to current date) which I did not upload. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
|
Hello,
Have you ran TraceOrders on your strategy to help determine why these trades are not being taken? If not, please see the following link: http://www.ninjatrader.com/support/f...ead.php?t=3627 The output from the TraceOrders property set to true should give us a better idea of why these trades might be ignored/not filled.
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
|
|
#7 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 72
Thanks: 14
Thanked 0 times in 0 posts
|
The strategy does execute trades in the live environment data as well as in backtesting.
However, if you see my first note, I had uploaded historical data using the the Historical data manage. The strategy does not execute any trades on the uploaded historical data alone. I did incorporate the 'TraceOrders = true;' command and ran backtesting. I am not sure where I can retrieve the output from? |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
|
Hello,
You should be able to see this by going to Tools--> Output window.
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Member
Join Date: Jan 2010
Location: Irvine, CA
Posts: 72
Thanks: 14
Thanked 0 times in 0 posts
|
I ran the trace on the old historical data and dont get any trace results. However, I am able to get a chart for the period. I tried this on the following periods:
1. 2/1/2006 - 2/28/2006 2. 2/1/2005 - 2/28/2005 3. 2/1/2006 - 4/21/2006 I ran the trace on current data (10/1/2011 - 10/31/2011) and I do get transactions as well as trace results. |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
|
Hello,
If you do not see issues with the sample strategies, but have repeated issues on your strategy, you will need to debug your strategy. I would suggest simplifying the code as much as possible by commenting out segments you do not need for the basic functionality. Click here for more information Debugging NinjaScript Once you've checked that the strategy operates at a basic level (buys and sells during this period), you can readd the other conditions and statement to see if you can isolate the issue to a single line or group of code.
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
![]() |
| Tags |
| backtesting, import historical data |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Imported Historical TS Data Problem | dincervolkan | Charting | 7 | 11-18-2010 11:01 AM |
| How to use imported historical data | captnops | Charting | 1 | 02-09-2010 03:55 PM |
| can imported historical data be used for | kaywai | Indicator Development | 1 | 01-27-2010 08:59 AM |
| How do I view imported historical data? | KeelRisk | Miscellaneous Support | 1 | 12-26-2008 03:49 AM |
| Questions about imported Historical data | maskiepop | General Programming | 3 | 08-27-2007 07:13 AM |