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 > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 04-01-2010, 10:17 AM   #1
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default Backtester Bug

Hi,
I have a trading system that was originaly designed in Amibroker and it was giving an 80% success. At ninja backtester it gives 100%.
It enters and exits the trades intrabar. Is that possible to conflict the ninja backtester?
I am sending you a photo.
Attached Images
File Type: gif ScreenHunter_02 Apr. 01 11.39.png (46.8 KB, 15 views)
Last edited by mailro; 04-01-2010 at 05:40 PM.
mailro is offline  
Reply With Quote
Old 04-01-2010, 10:44 AM   #2
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

Hello mailro,

Thank you for your post.

You can get different results when comparing backtesting systems. This could be due to different data, fill algorithms, or framework.


How have you structered the conversion from Amibroker to NinjaScript?
NinjaTrader_RyanM is offline  
Reply With Quote
Old 04-01-2010, 11:08 AM   #3
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default

What do you mean how I structured it? I just wrote it in nijascript.
If I got it right there is no bug in ninja backtester the results are trusty.
The data actually differ because amibroker gets data from strategy runner since ninja doesn't have DDE
mailro is offline  
Reply With Quote
Old 04-01-2010, 11:39 AM   #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

My first reply was meant to indicate some general reasons for seeing discrepencies across different systems. We need to know how your code is structured to help identify a specific reason why you're seeing that 100% win rate. How are your exits setup? Do you have conditions and Exit statements or are you using only SetProfitTarget() for your exits?
NinjaTrader_RyanM is offline  
Reply With Quote
Old 04-01-2010, 03:38 PM   #5
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default

The code goes like this:
Once the price cross (something) enter a position short or long.
Once you enter a position set a profit target and a stop loss target

The code has been created using the strategy wizard.
That's it.
**this (something) doesn't have any optimization values and didn't went through any optimization to get created.

Anyway I will let it ride for a couple of days untill some losses appear and I will let you know so you can locate the bug to the backtester.
mailro is offline  
Reply With Quote
Old 04-01-2010, 03:57 PM   #6
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

Hello Mailro,

We never claim that backtesting results will match performance in a live trading environment.

Please see this article on discrepencies between real time and a backtest.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 04-01-2010, 04:15 PM   #7
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default

Of course I know and I understand this.
If I see anythig strange between the backtester trades and the actuall trades I will let you know.

Thanks again for your help
mailro is offline  
Reply With Quote
Old 04-06-2010, 02:32 AM   #8
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default

Dear Ryan there several bugs with the backtester that why I was getting the 100% results.
I used as a fill algorithm the default.
The bugs are:
1) The backtester considers some trades that don't occur in Real life
2) Some Real life trades occur at different prices than the backtester considers
3) Some Real life losing trades are been reported as winning ones at the backtester
4) Some Real life losing trades are not been reported at all

If you are planning to resolve these bugs on a future version let me know if you want me to send you the trade lists or the charts of backtester and sim accounts so you locate the bugs more easily.
mailro is offline  
Reply With Quote
Old 04-06-2010, 08:15 AM   #9
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

Hello Mailro,

We expect there to be differences between real life trading and backtesting results. Some of the reasons for this are covered in the link in my previous response. Additionally you could have different trade groupings depending on when you start the test.

Can you provide a scenario so we can attempt to reproduce your findings?
NinjaTrader_RyanM is offline  
Reply With Quote
Old 04-06-2010, 09:44 AM   #10
mailro
Junior Member
 
Join Date: Dec 2007
Location: Greece
Posts: 24
Thanks: 3
Thanked 0 times in 0 posts
Send a message via Skype™ to mailro
Default

ok,
I have send the scenario at support@ninjatrader.com
mailro 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
Is this a known bug? joanNT Version 7 Beta General Questions & Bug Reports 10 03-25-2010 09:03 AM
Can strategy optimizer or backtester be accessed from an indicator? GoldStandard Strategy Analyzer 5 01-19-2010 06:17 AM
simulator vs backtester options jdfagan Version 7 Beta General Questions & Bug Reports 2 12-09-2009 08:42 AM
All stratagies initialized when open BackTester window? dbw451 Strategy Analyzer 4 01-02-2009 05:18 AM
possible bug woodside Strategy Analyzer 1 10-31-2007 11:44 AM


All times are GMT -6. The time now is 09:50 AM.