PDA

View Full Version : Unable to match order state to execution


junkone
03-12-2009, 02:53 AM
why did i get this error. i use only 1 order object and my exit orders always use entryOrder.FromEntrySignal to ensure that i have the right quantity.
exitOrder = ExitLong(entryOrder.Filled,SIGNAL9EMA_EXIT , entryOrder.FromEntrySignal);


Unable to match order state to execution: Order='859258713/DU27808' Name='PREVIOUS_BAR_ENTRY' State=Filled Instrument='$AUDUSD' Action=SellShort Limit price=0 Stop price=0 Quantity=0.04M Strategy='TradeCommanderStrategyVer2' Type=Market Tif=Gtc Oco='' Filled=40000 Fill price=0.642288 Token='092951c2d56d47c1a1cb9129d96d1665' Gtd='01/12/2099 12:00:00 AM' / Execution='$AUDUSD/0001f4e8.439a263d.01.01' Instrument='$AUDUSD' Account='DU27808' Name='PREVIOUS_BAR_ENTRY' Exchange=IBIdealPro Price=0.6422 Quantity=5 000 Market position=Short Commission=0 Order='859258713' Time='12/03/2009 4:23:12 AM' Multiplier=1E-05

NinjaTrader_Josh
03-12-2009, 07:36 AM
junkone,

This is a known IB related issue where redundant events are given. If you do not look for the order status events you will not run into this issue.

junkone
03-12-2009, 07:57 AM
can you explain this with an example. i am still scratching my head, where this alarm would have come up. i forced closign the trade because i did not know what was happening.

NinjaTrader_Bertrand
03-12-2009, 08:38 AM
What Josh was saying is, if you don't check for the order status events in the OnOrderUpdate() you won't notice this issue.

junkone
03-12-2009, 09:06 AM
would the entryOrder.FromEntrySignal still have the correct size if i were to use it for my exits.

NinjaTrader_Josh
03-12-2009, 09:32 AM
junkOne,

entryOrder.FromEntrySignal should even make much sense since an entry order does not have a from entry signal parameter. It only has a signalName parameter.

As far as entryorder.Filled, that will work with no problem.