|
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.
Order null rejected. Order already being processed by the system |
StuneFx
|
Post subject: Order null rejected. Order already being processed by the system |
Post rating: 0
|
Posted: Wed 24 Jul, 2013, 19:08
|
|
User rating: 0
Joined: Sat 10 Nov, 2012, 02:17 Posts: 3 Location: SlovakiaSlovakia
|
Greetings,
I have problem - if I let run just one strategy (enclosed in annex), it´s working fine, but when I copied this java file of the same strategy and start running these copies of strategy (for example 10 copies running at the same time), than this message appears "Order null rejected Order already being processed by the system." and all of openning positions are immediately closed according set parameter of period, for example after 30 minutes if period is set to 30 minutes.
I implemented waitForUpdate to this code to prevent this problem, but I think it´s useless:
IOrder o = this.engine.submitOrder(getLabel(i), instruments[i], IEngine.OrderCommand.BUY, amounts[i], bidBar.getClose(), slippage, stopLossPrice, takeProfitPrice); o.waitForUpdate(IOrder.State.FILLED, IOrder.State.CLOSED); if( ! IOrder.State.FILLED.equals(o.getState())) { print("Order not accepted"); continue; }
orders[i] = o.getLabel(); print("Order " + o.getLabel() + " opened.");
I will appreciate your help with this situation.
|
|
|
|
 |
API Support
|
Post subject: Re: Order null rejected. Order already being processed by the system |
Post rating: 0
|
Posted: Thu 25 Jul, 2013, 09:37
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Presumably you want each strategy instance to work only with its own orders and not to interfere with the orders of the other instances. For this purpose you need to adjust the strategy source code accordingly. One way to do this is maintaining an order list that the strategy works with, see: https://www.dukascopy.com/wiki/#Order_Management/Maintain_order_list
|
|
|
|
 |
StuneFx
|
Post subject: Re: Order null rejected. Order already being processed by the system |
Post rating: 0
|
Posted: Fri 26 Jul, 2013, 20:37
|
|
User rating: 0
Joined: Sat 10 Nov, 2012, 02:17 Posts: 3 Location: SlovakiaSlovakia
|
API Support wrote: Presumably you want each strategy instance to work only with its own orders and not to interfere with the orders of the other instances. For this purpose you need to adjust the strategy source code accordingly. One way to do this is maintaining an order list that the strategy works with, see: https://www.dukascopy.com/wiki/#Order_Management/Maintain_order_listI'm grateful for your assistance - I will try to fix it according your advice ...
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|