![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: May 2007
Location: , ,
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
|
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"); |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2007
Location: , ,
Posts: 102
Thanks: 0
Thanked 0 times in 0 posts
|
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?
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please provide the TraceOrders output as well as the trace logs.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |