toptrader
10-27-2009, 08:20 AM
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?
if (Positions[0].MarketPosition==MarketPosition.Long)
ExitLongLimit(limitprice,"LLimit","LE");
if (Positions[0].MarketPosition==MarketPosition.Long)
ExitLongLimit(limitprice,"LLimit","LE");