|
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.
about IOrder.close() function |
forhappytrading
|
Post subject: about IOrder.close() function |
Post rating: 0
|
Posted: Thu 06 Dec, 2012, 11:50
|
|
User rating: 0
Joined: Thu 06 Dec, 2012, 11:38 Posts: 5 Location: ChinaChina
|
assume , An buy stop Order with label "order 1" at 1.3000 was created by the following: IOrder Order1 = engine.submitOrder("order 1" ,Instrument.EURUSD, IEngine.OrderCommand.BUYSTOP,lots, openprice, slippage , sl , tp); String label = Order1.getLabel(); String Id = Order1.getId();
and before the order is filled, the order is canceled by calling
Order1.close();
then the order label and id became invalid. My question is how can i get the information of a canceled order ?
|
|
|
|
 |
API Support
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Thu 06 Dec, 2012, 12:09
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
forhappytrading wrote: how can i get the information of a canceled order ? From its reference, i.e., Order1 object in your case.
|
|
|
|
 |
forhappytrading
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Fri 25 Jan, 2013, 15:33
|
|
User rating: 0
Joined: Thu 06 Dec, 2012, 11:38 Posts: 5 Location: ChinaChina
|
API Support wrote: forhappytrading wrote: how can i get the information of a canceled order ? From its reference, i.e., Order1 object in your case. If I have restarted the stategy, the Order1 object does not exist any more. Can I get the canceled order with some function like the OrderSelect(ticket, SELECT_BY_TICKET) function in MT4 ?
|
|
|
|
 |
API Support
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Fri 25 Jan, 2013, 15:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
forhappytrading
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Fri 25 Jan, 2013, 15:52
|
|
User rating: 0
Joined: Thu 06 Dec, 2012, 11:38 Posts: 5 Location: ChinaChina
|
API Support wrote: IEngine.getOrder(String label) only returns the order with State of FILLED or OPENED or CREATED. A closed pending order(CANCELED order) can not be accessed by this function.
|
|
|
|
 |
API Support
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Fri 25 Jan, 2013, 15:56
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
forhappytrading
|
Post subject: Re: about IOrder.close() function |
Post rating: 0
|
Posted: Fri 25 Jan, 2013, 16:00
|
|
User rating: 0
Joined: Thu 06 Dec, 2012, 11:38 Posts: 5 Location: ChinaChina
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|