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 10-27-2009, 08:20 AM   #1
toptrader
Senior Member
 
Join Date: May 2007
Location: , ,
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default Extra fills on limit order

I have a simple strategy that enters using a market order and exits using a simple limit order or stop. Very straight forward. My code for my limit exit is below. I tried attaching a screenshot but the file is too large. Basically I enter a position of 7 contracts, yet my limit order fills a total of 11 contracts. All 11 contracts are market LLimit, so I know that they all came from the profit target order. Why would these quantities be off?

Code:
if (Positions[0].MarketPosition==MarketPosition.Long)
	ExitLongLimit(limitprice,"LLimit","LE");
toptrader is offline  
Reply With Quote
Old 10-27-2009, 08:40 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

toptrader, are you attempting any scale in / scale out with your strategy or does it consist of one entry signal with a stop / target exit?

Are you already working with the TraceOrders feature to debug your order behavior?

http://www.ninjatrader-support2.com/...ead.php?t=3627
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 10-27-2009, 09:39 AM   #3
toptrader
Senior Member
 
Join Date: May 2007
Location: , ,
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
Default

I am not scaling in/out of positions. It is very straight forward. I have used trace orders, unfortunately that hasn't helped identify the issue thus far. I am running with CalculateOnBarClose=false. Do you think that would have anything to do with the issue?
toptrader is offline  
Reply With Quote
Old 10-27-2009, 09:48 AM   #4
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 provide the TraceOrders output as well as the trace logs.
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
buy limit /sell limit order at the same time possible? azuul General Programming 3 05-20-2009 07:42 AM
Are no fills on limit orders for 8+seconds normal when price matches order? nucc10 Miscellaneous Support 8 03-25-2008 01:30 PM
Strange Order Fills on Strategy ZN WW Strategy Development 1 02-04-2008 10:24 PM
Strategy Order Partial Fills in SIM account Kardinal Automated Trading 1 09-04-2007 06:54 AM
Getting horrible fills on Stop Limit Orders HudsonTrader Miscellaneous Support 3 02-01-2005 09:08 AM


All times are GMT -6. The time now is 04:31 AM.