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.

Handling ORDER_SUBMIT_REJECTED
 Post subject: Handling ORDER_SUBMIT_REJECTED Post rating: 0   New post Posted: Thu 15 Jul, 2010, 20:15 

User rating: 0
Joined: Sun 11 Jul, 2010, 20:12
Posts: 20
Suppose I get a IMesaage back from IEngine.submitOrder() and the message is ORDER_SUBMIT_REJECTED. Are there any circumstances where I could resubmit the exact same order? How can I tell the difference between an order that can be resubmitted as-is and an order that failed for a reason where it should NOT be resubmitted?

In MT4, when an order submit fails, there are many possible reason codes returned for this. Some of these reason codes are for reasons where it is OK to resubmit the same order, while other reason codes indicate it is NOT ok to resubmit the same order. In JForex, how can I tell the difference between these two? Or should I assume that whenever I get an ORDER_SUBMIT_REJECTED that it is for a serious reason and I should not try to resubmit that same order?


 
 Post subject: Re: Handling ORDER_SUBMIT_REJECTED Post rating: 0   New post Posted: Fri 16 Jul, 2010, 16:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Quote:
Are there any circumstances where I could resubmit the exact same order? How can I tell the difference between an order that can be resubmitted as-is and an order that failed for a reason where it should NOT be resubmitted?
There aren't any. Message ORDER_SUBMIT_REJECTED could happen:
  • if you try to submit order with some very wrong data like negative parameter.
  • if disconnect has happen when you submitting order. Then after a reconnect, the ORDER_SUBMIT_REJECTED message will be sent.
  • If you try to submit two similar(same instrument and if its by/sell) orders with time difference smaller then second(this will be available with next API release)


 

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