|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
BUYSTOP_BYBID & SELLSTOP_BYASK |
markg
|
Post subject: BUYSTOP_BYBID & SELLSTOP_BYASK |
Post rating: 0
|
Posted: Fri 17 Aug, 2012, 15:33
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
Hi Support,
For the following order where orderCommand = BUYSTOP_BYBID. What will the ordercommand be for the stoplossprice, SELLSTOP_BYASK or SELLSTOP?
submitOrder(String label, Instrument instrument, orderCommand, double amount, double price, double slippage, double stopLossPrice, double takeProfitPrice)
Regards
Mark
|
|
|
|
 |
markg
|
Post subject: Re: BUYSTOP_BYBID & SELLSTOP_BYASK |
Post rating: 0
|
Posted: Tue 21 Aug, 2012, 17:37
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
For the following order where orderCommand = BUYSTOP_BYBID.
The ordercommand for the stoplossprice defaults to SELLSTOP?
Is there a way to set the ordercommand for the stoplossprice to SELLSTOP_BYASK?
submitOrder(String label, Instrument instrument, orderCommand, double amount, double price, double slippage, double stopLossPrice, double takeProfitPrice)
Regards
Mark
|
|
|
|
 |
API Support
|
Post subject: Re: BUYSTOP_BYBID & SELLSTOP_BYASK |
Post rating: 0
|
Posted: Thu 23 Aug, 2012, 14:56
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
you can use IOrder interface method setStopLossPrice(double price, OfferSide side) and set OfferSide.BID.
|
|
|
|
 |
markg
|
Post subject: Re: BUYSTOP_BYBID & SELLSTOP_BYASK |
Post rating: 0
|
Posted: Thu 23 Aug, 2012, 16:17
|
|
User rating: 1
Joined: Thu 23 Feb, 2012, 11:22 Posts: 23
|
Great.
Is it necessary to wait after submitOrder() before submitting setStopLossPrice(double price, OfferSide side)?
order.waitForUpdate(2000)
|
|
|
|
 |
API Support
|
Post subject: Re: BUYSTOP_BYBID & SELLSTOP_BYASK |
Post rating: 0
|
Posted: Mon 27 Aug, 2012, 07:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Only if you right away want to use IOrder.getStopLossPrice. In that case you need to await the server's update on the order.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|