Hello,
I have been testing the IB Controller for
Autotrading and so far basic stuff is working well.
However when I try to place the following order,
1. Use a sell stop to enter a position at
118.95
2. Once filled set a trailing stop loss with
initial buystop at 119.30
I get an error saying " Trailing stop order can be
attached only to a limit or stop limit order
if (
ibc.IsConnected() ) // check
if connection to IB was successfull
{
parentID=ibc.PlaceOrder( "USD.JPY-IDEALPRO-CASH",
"SELL",
25000,
"STP",
0,118.95 , "GTC", False ); // place
order but do not transmit yet
ibc.PlaceOrder("USD.JPY-IDEALPRO-CASH",
"BUY",
25000,
"TRAIL",0, 119.30, "GTC", True, 1, "", parentID );
}
Can someone pls provide some guidance on this
pls?.
Thanks.
Cheers,Padhu
__._,_.___
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
SPONSORED LINKS
__,_._,___
|