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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 03-31-2011, 12:01 PM   #1
ScottB
Senior Member
 
Join Date: Jan 2009
Posts: 414
Thanks: 0
Thanked 20 times in 20 posts
Default Back testing issue

Hi,

I am trying to find a way around an issue I have with back testing vs. live trading.

If I am short and get a long signal, I want to exit at the market. Because I am using Unmanaged orders, I just change the profit order to a price well above the market and it effectively becomes a market order.

While this is true in live trading; I noticed in back testing, I am actually getting a fill at the limit price (almost 20 ticks above the market) which is above even the high of the bar.

I move my profit target from 1.4120 (6E) to 1.4164 and I get an execution at 1.4164 even though the high of that bar is 1.4148. In live trading I would get a fill at the close of the signal bar plus a tick or so; this constitues almost 20 ticks slippage.

I am looking for the following answers a) do I have a setting or something basic set wrong that could cause this b) is there a simple way around this?

I have already thought of lots of ways around the issue but they all involve changing code that works in live trading to accomodate a back test.

Any suggestions will be appreciated.

Best Regards,
Scott
ScottB is offline  
Reply With Quote
Old 03-31-2011, 12:18 PM   #2
Baruch
Senior Member
 
Join Date: Mar 2009
Posts: 441
Thanks: 0
Thanked 25 times in 16 posts
Default

Fill type=Liberal
Baruch is offline  
Reply With Quote
Old 03-31-2011, 12:24 PM   #3
ScottB
Senior Member
 
Join Date: Jan 2009
Posts: 414
Thanks: 0
Thanked 20 times in 20 posts
Default

Thanks that fixed it. Are there other implications to using fill type = liberal such as limit orders getting filled if the market traded at the price, etc?
ScottB is offline  
Reply With Quote
Old 03-31-2011, 12:44 PM   #4
ScottB
Senior Member
 
Join Date: Jan 2009
Posts: 414
Thanks: 0
Thanked 20 times in 20 posts
Default

It seems I have a special case and I am going to have to create my own fill algorithm to combine the two different types to get what I want.

Thanks.
ScottB is offline  
Reply With Quote
Old 03-31-2011, 12:59 PM   #5
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for the assist Baruch!

Yes you can do this if it is needed. However you are able to do so however it is largly unsupported and is a sandbox for you to "play" in.

Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Reply With Quote
Old 03-31-2011, 02:52 PM   #6
ScottB
Senior Member
 
Join Date: Jan 2009
Posts: 414
Thanks: 0
Thanked 20 times in 20 posts
Default

Brett, thanks for the information and offer.
ScottB 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
Strategy Back Testing mjc4118 Version 7 Beta General Questions & Bug Reports 3 12-09-2009 09:35 AM
Back Testing Data pistolpete Automated Trading 5 04-29-2009 07:37 AM
Back Testing With The TICK heyligerb Strategy Analyzer 1 02-01-2009 10:39 AM
back testing mary reed Strategy Analyzer 1 01-13-2008 07:23 PM
Re Back testing John_Aus Miscellaneous Support 6 03-15-2005 01:54 AM


All times are GMT -6. The time now is 12:30 PM.