|
JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Isak
|
Post subject: JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Mon 30 May, 2011, 16:21
|
|
User rating: 6
Joined: Thu 19 May, 2011, 11:14 Posts: 235 Location: South Africa,
|
Hello Support. Is it possible for you to define/list under which conditions the ORDER_CHANGED_OK message is generated?
Is there a way to discriminate between those ORDER_CHANGED_OK messages that are acknowledging IOrder.set* methods (i.e. those in the wiki's state diagrams), and the rest (e.g. "Overnight commission applied" etc.)
(The only solution I can think of is to look at IMessage.getContent(), but the possible strings are not documented and I suppose they are subject to change in future.)
|
|
|
|
|
RoadRunner
|
Post subject: Re: The various meanings of IMessage.Type.ORDER_CHANGED_OK |
Post rating: 1
|
Posted: Mon 30 May, 2011, 18:32
|
|
User rating: 3
Joined: Wed 18 May, 2011, 16:25 Posts: 331 Location: SwitzerlandSwitzerland
|
Dear support,
I agree with Isak, it would be very beneficial for us to have a list of possible messages. Analyzing the messages in onMessage() is most important to confirm submitted actions and to include exception handling in case orders were rejected or cancelled.
Best would be, if you would assign unique ID's or numbers to the messages.
I had a conversation about this topic a long time ago here in this forum with someone from support, and if I recall correctly back then the answer from was, that due to the design of the messaging no further arguments can be passed. If that's still the case you could send the unique ID as part of the message (e.g. as a prefix or suffix). If needed the unique ID could get extracted on the client side and presented through a function like message.getID().
Best, RR.
|
|
|
|
|
API Support
|
Post subject: Re: The various meanings of IMessage.Type.ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Wed 01 Jun, 2011, 15:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Isak wrote: Is it possible for you to define/list under which conditions the ORDER_CHANGED_OK message is generated? As far as IOrder interface is concerned ORDER_CHANGED_OK message may occur on following IOrder method calls: setRequestedAmount setOpenPrice setGoodTillTime setStopLoss setTakeProfit and at following IOrder states: OPENED FILLED Isak wrote: Is there a way to discriminate between those ORDER_CHANGED_OK messages that are acknowledging IOrder.set* methods (i.e. those in the wiki's state diagrams), and the rest (e.g. "Overnight commission applied" etc.) No. Isak wrote: (The only solution I can think of is to look at IMessage.getContent(), but the possible strings are not documented and I suppose they are subject to change in future.) Currently it is the only option how you can subclassify the ORDER_CHANGED_OK messages and as you already mentioned, the messages in future may change.
|
|
|
|
|
Isak
|
Post subject: Re: The various meanings of IMessage.Type.ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Thu 12 Apr, 2012, 09:48
|
|
User rating: 6
Joined: Thu 19 May, 2011, 11:14 Posts: 235 Location: South Africa,
|
Has this situation changed in the last 10 months? If not, could you please move this thread to "feature requests".
|
|
|
|
|
API Support
|
Post subject: Re: The various meanings of IMessage.Type.ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Thu 12 Apr, 2012, 09:56
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
Isak
|
Post subject: Re: The various meanings of IMessage.Type.ORDER_CHANGED_OK |
Post rating: 1
|
Posted: Fri 13 Apr, 2012, 11:01
|
|
User rating: 6
Joined: Thu 19 May, 2011, 11:14 Posts: 235 Location: South Africa,
|
What is needed is any mechanism that provides a future-proof way to discern, for example**, between: - an ORDER_CHANGED_OK message resulting from an order adjustment (e.g. a call to IOrder.setStopLossPrice(...))
- an ORDER_CHANGED_OK message resulting from overnight commissions applied to the order.
I am currently under the impression that the only way to discern between these two, is by IMessage.getContent(), which, as you have said in this thread, is not future-proof. What I am asking, is whether such a mechanism has been developed since this thread was started, and if it hasn't, whether we could file it as a feature request. (** of course this is just a specific example of what may be a more general problem: a standard way to identify the meaning of fundamentally different messages that carry the same IMessage.Type. I don't want to be too prescriptive, but I think the ideal solution would be to split the group of messages that map to ORDER_CHANGED_OK into more meaningful subgroups, such as - ORDER_CHANGED_OK for acknowledging calls to IOrder.set*()
- ORDER_CHANGED for signalling spontaneous events such as application of overnight commissions
In my view this solution would align well with what appears to have been the original intention: using ORDER_*_(OK|REJECTED) messages exclusively for acknowledging API-requested order operations.)
|
|
|
|
|
API Support
|
Post subject: Re: JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Fri 13 Apr, 2012, 11:32
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
The feature request has been registered.
|
|
|
|
|
API Support
|
|
Post subject: Re: JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Wed 30 May, 2012, 13:25
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
API 2.6.70 IMessage.getReasons() returns a sub-set of predefined reasons, specific to successful types of message (ORDER_CHANGED_OK, ORDER_CLOSE_OK, ORDER_FILL_OK): ORDER_CLOSED_BY_SL, // Order closed by Stop Loss trigger. ORDER_CLOSED_BY_TP, // Order closed by Take Profit trigger. ORDER_CLOSED_BY_MERGE, // Order get merged ORDER_CHANGED_SL // Stop Loss trigger was changed. ORDER_CHANGED_TP, // Take Profit trigger was changed. ORDER_CHANGED_AMOUNT // Order amount was changed. ORDER_CHANGED_PRICE, // Order price was changed. ORDER_CHANGED_GTT // Execution timeout (Good Till Time) was changed. ORDER_CHANGED_TYPE // Order Command was changed. ORDER_FULLY_FILLED // Order is Fully Filled. Wiki diagrams updated: https://www.dukascopy.com/wiki/#Order_state
|
|
|
|
|
zhao
|
Post subject: Re: JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Thu 31 May, 2012, 04:45
|
|
User rating: 0
Joined: Sun 27 May, 2012, 11:48 Posts: 13
|
Hello APISupport, many thanks for adding this, is it possible to add another which is ORDER_CLOSED_BY_STRATEGY? best regards. API Support wrote: API 2.6.70 IMessage.getReasons() returns a sub-set of predefined reasons, specific to successful types of message (ORDER_CHANGED_OK, ORDER_CLOSE_OK, ORDER_FILL_OK): ORDER_CLOSED_BY_SL, // Order closed by Stop Loss trigger. ORDER_CLOSED_BY_TP, // Order closed by Take Profit trigger. ORDER_CLOSED_BY_MERGE, // Order get merged ORDER_CHANGED_SL // Stop Loss trigger was changed. ORDER_CHANGED_TP, // Take Profit trigger was changed. ORDER_CHANGED_AMOUNT // Order amount was changed. ORDER_CHANGED_PRICE, // Order price was changed. ORDER_CHANGED_GTT // Execution timeout (Good Till Time) was changed. ORDER_CHANGED_TYPE // Order Command was changed. ORDER_FULLY_FILLED // Order is Fully Filled. Wiki diagrams updated: https://www.dukascopy.com/wiki/#Order_state
|
|
|
|
|
API Support
|
Post subject: Re: JFOREX-3498 The various meanings of ORDER_CHANGED_OK |
Post rating: 0
|
Posted: Thu 31 May, 2012, 08:00
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Off topics are strictly forbidden.
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|