Did you read the documentation carefully enough? If you did you would notice that in OCAGroup example parentID is set to ZERO !
These two do not mix. Either specify parentID (then TWS itself assigns special group) OR use OCAGroup string. Never both at the same time. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: "ssingh_01803" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, November 03, 2006 9:12 PM Subject: [amibroker] Re: IBController related > Thanks, it was my mistake. > But even after modifying the code, the OCA group parameter is not > reflected when the intial bracket order is placed. However, now I can > modify the order to update OCA group as below: > > ibc = GetTradingInterface("IB"); > > if( ibc.IsConnected() ) { > ibc = GetTradingInterface("IB"); > if( ibc.IsConnected() ) > { > parentID = ibc.PlaceOrder("PANC", "BUY", 300, "STPLMT", > 6.97,6.9,"GTC", False); > child1 = ibc.PlaceOrder("PANC", "SELL", 100, "LMT", 7.11, 0, "GTC", > False,100, "", parentID, "MYGROUP" ); > child2 = ibc.PlaceOrder("PANC", "SELL", 100, "STP", 6.5, 6.5, "GTC", > False,100, "", parentID, "MYGROUP" ); > } > > ibc.sleep(1000); > ibc.ModifyOrder(child1, "PANC", "SELL", 100, "LMT", 7.11, 0, "GTC", > False,100, "", parentID, "MYGROUP" ); > ibc.ModifyOrder(child2, "PANC", "SELL", 100, "STP", 6.5, 6.5, "GTC", > False,100, "", parentID, "MYGROUP" ); > > } > > > > --- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: >> >> Look at code examples: >> >> http://www.amibroker.com/at/ >> >> Bracket example NUMBER 4 >> >> OCAGroup example NUMBER 6. >> >> Your code is simply wrong. The "OCAGROUP" parameter >> is AFTER parentID, not before as in your code! >> >> Also for OCAGroup there is no need to pass parentID at all. >> >> General rule is read the documentation once, if you don't get the > results >> desired read it again and again. All code examples in the docs WORK. >> >> So if something does not work in your code it means that you did not >> copy examples accurately enough. >> >> Best regards, >> Tomasz Janeczko >> amibroker.com >> ----- Original Message ----- >> From: "ssingh_01803" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Friday, November 03, 2006 3:25 PM >> Subject: [amibroker] IBController related >> >> >> > I'm using IBController (1.1.1). I use the following code. >> > >> > ibc = GetTradingInterface("IB"); >> > if( ibc.IsConnected() ) >> > { >> > parentID = ibc.PlaceOrder("PANC", "BUY", 300, "STPLMT", 6.97, >> > 6.9,"GTC", False); >> > ibc.PlaceOrder("PANC", "SELL", 100, "LMT", 7.11, 0, "GTC", False, >> > 100, "MyGroup", parentID ); >> > ibc.PlaceOrder("PANC", "SELL", 100, "STP", 6.5, 6.5, "GTC", False, >> > 100, "MyGroup", parentID ); >> > } >> > >> > I don't get "MyGroup" as OCA group value. Also, I tried to >> > ibc.ModifyOrder to change OCA group for the bracketed order but it >> > didn't change OCA attribute. Is it a API limitation or I'm missing >> > something? >> > >> > My main issue is that I would like to attach 2 set of brackted order >> > having different OCA group for each set. >> > >> > >> > >> > >> > Please note that this group is for discussion between users only. >> > >> > To get support from AmiBroker please send an e-mail directly to >> > SUPPORT {at} amibroker.com >> > >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: >> > http://www.amibroker.com/devlog/ >> > >> > For other support material please check also: >> > http://www.amibroker.com/support.html >> > >> > Yahoo! Groups Links >> > >> > >> > >> > >> > >> > >> > > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > > > > > > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
