SmartQuant Discussion
http://www.smartquant.com/forums/

correct syntax of trailing limit order
http://www.smartquant.com/forums/viewtopic.php?f=42&t=7700
Page 1 of 1

Author:  cwl16 [ Wed Oct 21, 2009 2:01 pm ]
Post subject:  correct syntax of trailing limit order

hi,

I would like to set up a trailing limit order in IB which "buys in the dip", i would like to know the correct syntax of the trailing order


i try something like this in OQ,


Code:

EntryOrder = BuyStopLimitOrder ( Quantity, LimitPrice, StopPrice , text)
EntryOrder.Type = OrderType.TrailLimit;
EntryOrder.TrailingAmt = 0.01;
EntryOrder.Send ();




however the code doesn't work, and i wonder the correct way of writing this, thanks in advance.

clayton

Author:  Alexei Kurov [ Wed Oct 21, 2009 3:31 pm ]
Post subject: 

Hi,

What do you mean by "the code does not work"?

Regards,
Alex

Author:  cwl16 [ Thu Oct 22, 2009 7:38 am ]
Post subject: 

"the code doesn't work", not that it didn't generate any trade, but the price it generates is at a different price than i expected.

I saw a few of them and the price they traded are more than i expected. So i wonder if my syntax is wrong because i couldn't find a working example in the forum or in the document. I see someone uses a trailing stop order, but not a trailing limit order, and i am guessing from the limited amount of information i gathered.

Author:  Alexei Kurov [ Thu Oct 22, 2009 3:49 pm ]
Post subject: 

Hi,

As far as I know, in a case of TrailLimit order type, the 'final' limit price are not set in the order you send, but the broker recalculates the value until stop price triggers.
Did you read about TrailLimit order type on IB website?

Regards,
Alex

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/