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 12-12-2011, 11:32 AM   #1
Thomas79
Senior Member
 
Join Date: Apr 2009
Location: Paris
Posts: 146
Thanks: 11
Thanked 0 times in 0 posts
Send a message via MSN to Thomas79
Default difference between the realtime and the backtest

Hi

i launch my strategy in real time this morning, i come back from the office this evening... and i can see no trade from my strategy on FGBL market, i look at the chart and normally it should !!!

i made the backtest of the day and i have the trade...

Look at the picture, you can see the result of the backtest and behind on the second line, the strategy with no trade !

more important and more affraid... the same strategy on the FESX (first line) made a short trade and lost 27 ticks... but when i made the backtest... it should had to BUY and not to sell ! watch the second picture !

It is a really big problem if the backtest and the real money are different !

To launch a strategy in realtime, i have to launch it via a chart ? and not only via the "Strategies" page....
Attached Images
File Type: jpg no trade.jpg (154.2 KB, 13 views)
File Type: jpg opposite trade.jpg (162.7 KB, 13 views)
Thomas79 is offline  
Reply With Quote
Old 12-12-2011, 11:36 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Thomas,

There are discrepancies between backtesting and real-time trading.

http://www.ninjatrader.com/support/h...ime_vs_bac.htm

You can get more accurate back-testing results if you increase granularity. Here is a reference sample.

http://www.ninjatrader.com/support/f...ead.php?t=6652

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 12-12-2011, 12:47 PM   #3
Thomas79
Senior Member
 
Join Date: Apr 2009
Location: Paris
Posts: 146
Thanks: 11
Thanked 0 times in 0 posts
Send a message via MSN to Thomas79
Default

i just read closely the link...

there are 4 possibilities:

- getting Filled on a order: my order are "market", no limit, no stop...
- the fill price of orders: same than above !
- running a strategy on a bar close or tick by tick: i'm running it on bar close in 60 minutes, so exactly as in back testing...
- difference in chart data: there is no difference between my chart data... in real time and in backtest...

the problem is not that i have order sent and not filled... or different data... this is than my strategy doesn't not give me the signal and even more dangerous... it gave me a wrong signal !!!

do i have to run it only with a chart ?

for the second link... i don't need it because i'm using calculate on bar close on my backtest and realtime... and it is what i want...

please, can you help ?
Thomas79 is offline  
Reply With Quote
Old 12-12-2011, 01:14 PM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Thomas,

I can take a look at your entrance criteria to see if I notice anything. Ill just need your strategy code.

In your case this is an entrance signal, however please keep in mind stops and take profits will be affected by intra-bar granularity even with calculate on bar close = false.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 12-12-2011, 01:43 PM   #5
Thomas79
Senior Member
 
Join Date: Apr 2009
Location: Paris
Posts: 146
Thanks: 11
Thanked 0 times in 0 posts
Send a message via MSN to Thomas79
Default

where can i send you the code ?
Thomas79 is offline  
Reply With Quote
Old 12-12-2011, 01:44 PM   #6
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Thomas,

You can send it to support@ninjatrader.com with ATTN : Adam in the body, or if you are comfortable you can post it here.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 12-13-2011, 07:07 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Thomas, we got the code and are looking into matters.
NinjaTrader_Bertrand 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
Backtest/RealTime neb1998 Suggestions And Feedback 1 03-28-2011 10:48 AM
Backtest Realtime Volume Edward Kunafi Strategy Development 4 08-03-2010 01:56 PM
Difference in src code between strategy for backtest and ATM zooinek Strategy Development 1 02-04-2010 06:22 AM
realtime versus backtest svadlenka Strategy Development 3 11-25-2009 04:12 AM
Difference Betwwen Real time & BackTest Mode dgregor5 Strategy Analyzer 3 10-31-2007 03:43 PM


All times are GMT -6. The time now is 10:15 AM.