|
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 |
TAA
|
Post subject: resubmit order |
Post rating: 0
|
Posted: Thu 16 Aug, 2012, 16:32
|
|
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
|
|
|
|
 |
API Support
|
Post subject: Re: resubmit order |
Post rating: 0
|
Posted: Thu 23 Aug, 2012, 15:30
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
TAA
|
Post subject: Re: resubmit order |
Post rating: 0
|
Posted: Thu 23 Aug, 2012, 18:04
|
|
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
|
|
|
|
 |
API Support
|
Post subject: Re: resubmit order |
Post rating: 0
|
Posted: Mon 27 Aug, 2012, 10:00
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
TAA
|
Post subject: Re: resubmit order |
Post rating: 0
|
Posted: Wed 29 Aug, 2012, 17:54
|
|
User rating: 0
Joined: Thu 13 Oct, 2011, 17:27 Posts: 21 Location: SwitzerlandSwitzerland
|
fantastic:) and very helpful thank you so much. cheers
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|