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 01-09-2009, 10:54 AM   #1
kcsystemtrader
Member
 
Join Date: Dec 2008
Location: Kansas City
Posts: 90
Thanks: 0
Thanked 2 times in 2 posts
Default Partial Fills On Entry During Simulation

I am running a strategy right now with position size set 'by strategy' of 100 shares. Almost everytime an entry occurs, it fills in lots of 95 shares, 2, and 3 shares (or some variation thereof). Sometimes it is two executions, sometimes three.

Is there a way to make the entry orders be "all or nothing", so that it will only execute if 100 shares can be filled? I believe that most brokerages support an All or Nothing order type.

For exit, I use a trailing stop and have the Stop and Target Submission set to "ByStrategyPosition", so it only has one trailing stop order for all three entries, but then it will also create partial fills once it is executed.

Thanks,

kc
kcsystemtrader is offline  
Reply With Quote
Old 01-09-2009, 11:05 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

If you are in sim mode you can try this: Tools->Options->Simulator->Uncheck "Enforce partial fills". In real-life, there is no guarantee that you do not get partial fills.
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-09-2009, 11:21 AM   #3
kcsystemtrader
Member
 
Join Date: Dec 2008
Location: Kansas City
Posts: 90
Thanks: 0
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by NinjaTrader_Josh View Post
If you are in sim mode you can try this: Tools->Options->Simulator->Uncheck "Enforce partial fills". In real-life, there is no guarantee that you do not get partial fills.
I should have mentioned that I already have that box unchecked, yet am still getting parital fills in simulation.
kcsystemtrader is offline  
Reply With Quote
Old 01-09-2009, 11:25 AM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Right. There is no guarantees you do not get a partial fill. Being partially filled is a function of what is happening in the market. It is even more prevalent if you are using limit order types.
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-09-2009, 11:28 AM   #5
kcsystemtrader
Member
 
Join Date: Dec 2008
Location: Kansas City
Posts: 90
Thanks: 0
Thanked 2 times in 2 posts
Default

You would think that in simulation mode, which is what I am in, by unchecking that box that would force it to fill you only once. What is the point of the "enforce partial fills" box if unchecking it does not do anything?

As far as I can tell, partial fills are enforced whether the box is checked or not.
kcsystemtrader is offline  
Reply With Quote
Old 01-09-2009, 11:31 AM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

No. Enforce partial fills helps you test partial fills in a liquid market where it would otherwise not happen. In illiquid markets this is a different story. The simulator takes into consideration bid price, ask price, bid/ask volume, last price/volume, etc. The algorithm is highly dynamic and no matter how you play it, if you are in an illiquid market you will get partial fills.
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-09-2009, 01:23 PM   #7
kcsystemtrader
Member
 
Join Date: Dec 2008
Location: Kansas City
Posts: 90
Thanks: 0
Thanked 2 times in 2 posts
Default

Yeah, I hear ya, but it still isn't quite right. Would you consider MSFT or AAPL a liquid market? I'm not sure gets any more liquid. That is what I'm testing on. I'm using market orders.

In real life, if you place a 100 share market order on pretty much any Nasdaq 100 stock, you will get filled instantly, no partial fill. For some reason, with eSignal data and in simulation mode, NT doesn't seem to think it could obtain that execution. I guess I'll have to wait and see how it performs in real-time, but still not sure I understand why you can't configure the simulator to not have partial fills. Thanks,

kc
kcsystemtrader is offline  
Reply With Quote
Old 01-09-2009, 01:30 PM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

http://www.ninjatrader-support.com/H...ulatorOverview

Check your delay settings.
NinjaTrader_Josh 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
Strange partial fills? beastment Strategy Development 11 01-03-2009 08:40 AM
Partial Fills nfeldberg Strategy Development 2 08-26-2008 09:23 AM
Partial Fills SystemTrading Miscellaneous Support 1 08-20-2008 08:43 AM
Partial Fills Harry ATM Strategies (Discretionary Trading) 5 02-26-2008 06:25 AM
Partial fills and disconnects TraderTony Miscellaneous Support 3 04-12-2006 01:03 AM


All times are GMT -6. The time now is 01:21 PM.