SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Aug 21, 2019 5:35 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Oct 21, 2009 2:01 pm 
Offline

Joined: Mon Sep 14, 2009 4:07 pm
Posts: 4
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 21, 2009 3:31 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

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

Regards,
Alex

_________________
SmartQuant Development Team


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 22, 2009 7:38 am 
Offline

Joined: Mon Sep 14, 2009 4:07 pm
Posts: 4
"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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 22, 2009 3:49 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
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

_________________
SmartQuant Development Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group