PDA

View Full Version : Cancelled order


MrBaffalo
04-26-2007, 04:35 AM
Hi all,

I'm wrestiling with order logic: I wrote an easy system wich exits multiple positions, orders seem to be placed and executed fine, but controc center->orders shows a redundant "cancelled". I really do not understand what can cause that.

Below a piece of the code:

if (Position.MarketPosition != MarketPosition.Flat)

if (Position.MarketPosition == MarketPosition.Long){

if (Position.Quantity == ctr)

{



ExitLongLimit(ctr/3, (Position.AvgPrice + target1), "1st Exit", "");

ExitLongStop(ctr, (Position.AvgPrice - stop), "1stStop", "");

And attached a snapshot of the contro center.

The problem is that second "buytocover" limit orders which appears after the same order has been filled.

Thanks in advance for your help,

regards

Marce

NinjaTrader_Ray
04-26-2007, 05:04 AM
I can't tell what or what not your strategy should be doing from the information provided. When trade is entered, are thereredundant live orders placed? If not, when does that order come live and cancel? Although the Control Center Log tab can be difficult to read, you can review it to see the sequence of how and what orders placed live to gain an understanding what may be happening.

Ray

MrBaffalo
04-26-2007, 05:44 AM
Thanks Ray, tomorrow I'll have a look, but something is not working fine, I need to debug and debug...and this is a very simple and easy code made to understand logic.:?

p.s. When I apply the strategy, past orders are placed fine and fine appears execution, qhile running on live data...something doesn't work.

thanks

Marce