Dukascopy
 
 
Wiki JStore Search Login

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.

Stop order rejected what IMessage.TYPE?
 Post subject: Stop order rejected what IMessage.TYPE? Post rating: 0   New post Posted: Tue 26 Oct, 2010, 09:12 

User rating: 0
Joined: Wed 20 Oct, 2010, 16:06
Posts: 6
I want my script to do something whenever I get message "Stop order has been rejected by interbank party. System will resubmit this order.". I thought it was the ORDER_FILL_REJECTED type of message, but apparently it's not, because it never prints "works" even though I get the message. How to deal with it?

    public void onMessage(IMessage message) throws JFException {        
            if (message.getType() == Type.ORDER_FILL_OK){
            ...
            }
        else if (message.getType() == Type.ORDER_FILL_REJECTED) {
            console.getOut().println("works");
       }
    }


 
 Post subject: Re: Stop order rejected what IMessage.TYPE? Post rating: 0   New post Posted: Thu 28 Oct, 2010, 07:52 

User rating: 0
Joined: Wed 20 Oct, 2010, 16:06
Posts: 6
I also tried
message.getContent() == "Stop order has been rejected by interbank party. System will resubmit this order."

But it doesn't work either. Please help.

Edit:
My workaround for now is:
        else if (message.getType() == Type.NOTIFICATION) {
            String mess = message.getContent();
            int index1 = mess.indexOf("rejected by interbank");
            if (index1 != -1) {
               ...
            }
        }


But I'd rather check message.getContent() directly. Isn't it supposed to be "REJECT_AND_RESUBMIT-Stop order has been rejected by interbank party. System will resubmit this order." ? If no, what's the full text of this message?


 
 Post subject: Re: Stop order rejected what IMessage.TYPE? Post rating: 0   New post Posted: Thu 11 Nov, 2010, 14:07 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Order can be rejected during submit or during fill, please determine when you order is rejected and use ORDER_FILL_REJECTED or ORDER_SUBMIT_REJECTED message.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com