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 > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 04-16-2010, 05:37 PM   #1
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default Prices not rounded in backtest results

I just ran a backtest, and in the Strategy Analysis trade window the prices are often not rounded to the ticks, e.g. for EURUSD forex:

1.03475
1.027453102
1.029395636
1.03175
1.029167089
1.0269485
1.022742568

I haven't checked if this rounding error occurs before or after the statistics based on these prices are calculated. Hopefully afterwards.
Last edited by adamus; 04-16-2010 at 05:47 PM.
adamus is offline  
Old 04-17-2010, 01:33 PM   #2
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

adamus, which instrument is this for? Is it reproducible? If so, can you send us your strategy and let us know exactly how to re-create these non-round values?
NinjaTrader_Austin is offline  
Old 04-18-2010, 06:37 AM   #3
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

Hi Austin,

it's the EUR.USD forex pair. The results are the backtest of my strategy, which has the settings:

Code:
Item                    Value
"Parameters"    
Param1                  1
Param2                  1
"Data series"    
"Price based on"        Last
"Type"                  Minute
"Value"                 60
"Time frame"     
"From"                  01/01/2000
"To"                    17/04/2010
Session template        <Use instrument settings>
General    
Include commission      False
Label                   TrendFollower
Maximum bars look back  TwoHundredFiftySix
Min. bars required      55
Historical Fill Processing    
Fill type               Default
Slippage                0
Order Handling    
Entries per direction   1
Entry handling          AllEntries
Exit on close           True
Order Properties    
Default quantity        100000
Set order quantity      by default quantity
Time in force           Day
The strategy is attached as a file - unfortunately it is not profit-making so it is only of interest due to its ability to produce this bug in 7-beta.
Attached Files
File Type: txt nt7-beta-bug.txt (4.2 KB, 5 views)
adamus is offline  
Old 04-18-2010, 12:54 PM   #4
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

adamus, sorry I forgot to ask this in the first post, but who is your data provider? I will try this with the data I have available and see if I can reproduce.

As a side note: it would probably be much faster and easier for you if you just took a screenshot of the settings in the future instead of typing it all out.
Last edited by NinjaTrader_Austin; 04-18-2010 at 12:57 PM.
NinjaTrader_Austin is offline  
Old 04-18-2010, 01:02 PM   #5
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

Just finished up a test with eSignal data but I was unable to reproduce the non-rounded prices. Are those prices the actual prices reported by your data provider? If so, that would be why they aren't rounded.
NinjaTrader_Austin is offline  
Old 04-18-2010, 04:09 PM   #6
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

Quote:
Originally Posted by NinjaTrader_Austin View Post
Just finished up a test with eSignal data but I was unable to reproduce the non-rounded prices. Are those prices the actual prices reported by your data provider? If so, that would be why they aren't rounded.
This is a backtest against data I imported into NT myself.

There is no way that such prices came from that data, which is totally clean in this respect.

These prices are obviously the un-rounded moving average values which I pass into the limit and stop orders. Surely NT is rounding them when it creates the order?
adamus is offline  
Old 04-19-2010, 09:15 AM   #7
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

adamus,

Please check into if you are getting partial fills. If you are, the displayed average price is average amongst your fills and can show like that.
NinjaTrader_Josh is offline  
Old 04-19-2010, 10:49 AM   #8
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

Hi Josh,

I'm not getting any partial fills - this is backtesting! I just checked the executions. For instance the sixth execution I get when I run it from 2001-01-01 is 2001-01-15 03:00 @ 0.9471.

However the trade then shows the exit price as 0.947112975 (the previous 5 executions were all accurate).

Also the commission is incorrect, if that perhaps has anything to do with it. It should be $5 commission but it shows only $3.50 has been subtracted from the profit.
adamus is offline  
Old 04-19-2010, 12:02 PM   #9
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

adamus,

Please try this with SampleMACrossOver and see if you experience the same. If so, please provide us with all information on how you have your commission structure setup as well as the order quantity you are sending at. We will also need screenshots of the orders and trades tabs to see what exactly you are seeing. Thanks.
NinjaTrader_Josh is offline  
Old 04-19-2010, 12:10 PM   #10
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

Quote:
Originally Posted by adamus View Post
Surely NT is rounding them when it creates the order?
Just wanted to chime in real quick and answer this un-answered question. Yes, NT does round the price before sending the order.
NinjaTrader_Austin is offline  
Old 04-19-2010, 05:10 PM   #11
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

I ran a backtest with SampleMACrossover and it didn't show any unrounded characters.

So it is only with my strategy.

The commission is set up as 2.50 minimum and then 2*-5 : 0

Here are the attachments.
Attached Images
File Type: png UnroundedPricesEx.png (98.3 KB, 5 views)
File Type: png UnroundedPrices.png (104.8 KB, 5 views)
adamus is offline  
Old 04-20-2010, 08:54 AM   #12
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Please find my results with SampleMACrossOver in the attachments. In Tools>Options>Data I have the quote currency set to Pip. Can you please try this on your end too?

Also, I did not quite follow what you mean by 2*-5 : 0 for commissions. Can you please clarify?
Attached Images
File Type: png 1.png (127.5 KB, 5 views)
File Type: png 2.png (149.7 KB, 5 views)
NinjaTrader_Josh is offline  
Old 04-20-2010, 12:13 PM   #13
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

Hi Josh,

I was quite surprised when I ran the SampleMACrossover strategy and didn't get any un-rounded prices.

I checked my Options and set the setting to Pips - it was on half-pips due to the recommendations when loading the data I bought - but it made no difference to the un-rounded occurrences (still frequent).

The 2*-5 : 0 is what is displayed in the properties for the instrument in the commissions tab: the commission is 0.00002 per currency unit. The zero is for units at that level.
adamus is offline  
Old 04-20-2010, 01:56 PM   #14
NinjaTrader_Austin
NinjaTrader Customer Service
 
NinjaTrader_Austin's Avatar
 
Join Date: Jun 2009
Location: Denver, CO
Posts: 3,149
Thanks: 10
Thanked 89 times in 81 posts
Default

adamus, would it be possible for you to send us your data? If it is a huge data file, could you find the shortest backtest time-span that produces the un-rounded prices and then just send us just that portion of the data?

We would like to investigate this further and have been unsuccessful so far with the data we have.

EDIT: You can send it to support at ninjatrader dot com attn 'thread 28118, ticket 306645'. Thank you.
NinjaTrader_Austin is offline  
Old 04-20-2010, 05:33 PM   #15
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,058
Thanks: 33
Thanked 2 times in 1 post
Default

Hi Austin,

I'm glad you're prepared to look into it.

However I cannot get the data out of the Historical Data Manager. The export button is permanently greyed-out. What can I do to get it enabled?

The data files which I loaded are from disktrading.com and the files are huges - the smallest I can find is 65MB.
adamus is offline  
 

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
Export Backtest results Franzl Strategy Analyzer 3 11-13-2009 04:58 AM
Problem with Volume Bars - prices are rounded Eubie Charting 4 08-02-2009 02:08 PM
Where are backtest results saved verge Market Analyzer 3 05-18-2009 11:06 AM
Wierd Backtest Results darckeen Strategy Analyzer 2 04-15-2009 08:32 AM
Inconsistent backtest results ctrlbrk Strategy Development 11 11-27-2008 11:53 AM


All times are GMT -6. The time now is 07:57 AM.