Did a little trial and error. It appears as though the error is in the limit price (L-10). I suspect that, because L returns the Low array, the PlaceOrder call does not know which Low you want to use. Try using a fixed number and see if the bracket order goes in, then reset your limit price to a fixed price, such as LastValue(L) or SelectedValue(L).
Good Luck, Snap --- In [email protected], "eric tao" <[EMAIL PROTECTED]> wrote: > > Hi t, > Thank you for your response. > But it returned the same error after I change ticksize. > Is there anyone succeed in bracket order using parentID? > > Eric > > --- In [email protected], "tjloyd" <lifferds@> wrote: > > > > OOPS. I think pips actually need to be 10000. 100=.01, 1=.0001 > > > > --- In [email protected], "tjloyd" <lifferds@> wrote: > > > > > > It also looks as if your pips is wrong. YM trades in whole numbers so > > > I think pips must set to 1. > > > > > > ibc.PlaceOrder(YM SEP07-ECBOT-FUT, "BUY", 1, "LMT", L-10, 0, "GTC", > > > False, 1, "", pid); > > > > > > --- In [email protected], "eric tao" <erichtao@> wrote: > > > > > > > > Hi Guys, > > > > > > > > I get following error when I try to place a bracket order using IB > > > > Controler. Help please. > > > > > > > > //-------------------------------------- > > > > // this one succeed > > > > pid = ibc.PlaceOrder(YM, "SELL", 1, "MKT", 0, 0, "Day", False ); > > > > > > > > // this one failed, it says: > > > > // COM method/function 'PlaceOrder' call failed. > > > > ibc.PlaceOrder(YM, "BUY", 1, "LMT", L-10, 0, "GTC", False, 100, "", > > > pid); > > > > > > > > // this one failed too, same error message > > > > ibc.PlaceOrder(YM, "BUY", 1, "STP", 0, L+5, "GTC", True, 100, "", > > > > pid); > > > > > > > > //-------------------------------------- > > > > > > > > Thank you in advance. > > > > Eric > > > > > > > > > >
