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.

resubmit order
 Post subject: resubmit order Post rating: 0   New post Posted: Thu 16 Aug, 2012, 16:32 
User avatar

User rating: 0
Joined: Thu 13 Oct, 2011, 17:27
Posts: 21
Location: SwitzerlandSwitzerland
hello, please help me to code this under the onMessage function:

if my strategy has sent out an order and it was rejected for other than my own reasons then i want the same order to be requested again and again until it succeeds.

i am talking of situations when my orders can not be processed due to massive traffic or difficulties with defining the price and things like that.

thanks


 
 Post subject: Re: resubmit order Post rating: 0   New post Posted: Thu 23 Aug, 2012, 15:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please see https://www.dukascopy.com/wiki/#Manage_Order_State/Resubmit_order


 
 Post subject: Re: resubmit order Post rating: 0   New post Posted: Thu 23 Aug, 2012, 18:04 
User avatar

User rating: 0
Joined: Thu 13 Oct, 2011, 17:27
Posts: 21
Location: SwitzerlandSwitzerland
ok thank you very much for providing this solution:)

now, the waitForUpdate command will block my strategy for that time and hinder it to run through other instruments while waiting

so, can this be put in the onMessage function in a way that my strategy keeps executing new orders in the meantime under the onBar function?

what i mean is that probaly my strategy releases 5 orders at once upon a new bar is drawn and no.2 of them fails - i want to catch this fail as soon as the rejection message arrives and repeat the order then. is this possible (easily)?

thanks


 
 Post subject: Re: resubmit order Post rating: 0   New post Posted: Mon 27 Aug, 2012, 10:00 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See the updated article:
https://www.dukascopy.com/wiki/#Manage_Order_State/Resubmit_order


 
 Post subject: Re: resubmit order Post rating: 0   New post Posted: Wed 29 Aug, 2012, 17:54 
User avatar

User rating: 0
Joined: Thu 13 Oct, 2011, 17:27
Posts: 21
Location: SwitzerlandSwitzerland
fantastic:) and very helpful
thank you so much. cheers


 

Jump to:  

  © 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