|
Multiple simultaneous orders error |
gangsta1
|
Post subject: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Wed 09 Mar, 2016, 12:14
|
|
User rating: 0
Joined: Wed 04 Feb, 2015, 22:35 Posts: 21 Location: United KingdomUnited Kingdom
|
"Multiple simultaneous orders in execution. Orders executed on first in / first out basis."
Can I do something with a block(s) of code to avoid this and why does it happen? Why do I also get a "partial fill" message in the logs?
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Wed 09 Mar, 2016, 15:11
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
This message is generated by the server and you can not block it in any case. It warns the user that at the moment when the trade reached the market, several trades are queued which may result in delayed execution in terms of time and/or price (slippage). We have the "infrastructure" to handle such messages but it is not fully implemented. It is through the Trade event start point; and later it would be possible to capture this message and work the strategy accordingly (stop it / insert a break / etc ...)
partial fill is another story and it is part of the market and trading behavior. Partial fill can be a consequence of many situations, such as full use of margin.
|
|
|
|
 |
gangsta1
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Wed 09 Mar, 2016, 15:17
|
|
User rating: 0
Joined: Wed 04 Feb, 2015, 22:35 Posts: 21 Location: United KingdomUnited Kingdom
|
Noted, but is it possible to cancel the order if it is not executed </>(x)amount from price?
If I code a strategy and use a maximum slippage setting, will this prevent my strategy from entering/exiting when there are multiple simultaneous orders and partial fills? E.g. Set max slippage to 5 and if price goes below/above the wanted price in the case of Multiple simultaneous orders or partial fills then the strategy will not enter/exit? I am not sure if max slippage will help my strategy avoid entering at unfavorable prices in the case of multiple simultaneous orders/partial fills or perhaps "Fill or Kill" feature is needed to be added.
Please advise.
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Wed 09 Mar, 2016, 17:47
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Slippage is what you're looking for. When Set to 5 pips as you said, if the price moves more than 5 pips from the moment when the strategy submit the order till it reaches the market the order will be rejected which is indeed protecting you in case of volatile market and where the execution price might be slipped. Fill or Kill is a validity and doesn't have any impact on the execution price itself but more the executed amount which should be fully executed otherwise the order has to be cancelled.
|
|
|
|
 |
gangsta1
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Thu 10 Mar, 2016, 11:59
|
|
User rating: 0
Joined: Wed 04 Feb, 2015, 22:35 Posts: 21 Location: United KingdomUnited Kingdom
|
Is there a way to check for volume data and use a FILL OR KILL in Visual JForex blocks? So, I could check in my strategy if there is enough volume/liquidity available for the requested entry/exit size (EXECUTED AMOUNT) and only enter/exit if the FULL amount can be accepted, not partial fills. Does the historical data in JForex contain such information so I can get more realistic historical tests?
basically, when I am testing my strategy live, I am seeing lots of partial fills - I want to be able to test my strategy in the historical tester with partial fills.
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Thu 10 Mar, 2016, 15:17
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
The partial fill executions are quite surprising, could you please give me your account number so that I can check that? Fill or Kill option is not available in VJF but you can still get the tick BID and ASK volume available in the left section under "OnTick" section to do your verification but bear in mind that even if the total available volume is enough this doesn't garantee 100% that your order would be filled fully as it depends on the order priority (Limit Vs Stop ) the order rank at the level of the market (first in first out) etc... Are you sure that your partial fills are not caused by the maximum use of leverage ?
Thanks
|
|
|
|
 |
gangsta1
|
Post subject: Re: Multiple simultaneous orders error |
Post rating: 0
|
Posted: Thu 10 Mar, 2016, 21:04
|
|
User rating: 0
Joined: Wed 04 Feb, 2015, 22:35 Posts: 21 Location: United KingdomUnited Kingdom
|
I did notice that some orders were not opened at all because the leverage was maxed out, but other orders that were already opened did not always close all the position at once when there was an exit signal. Then if the exit signal was no longer valid I would be left with a partially open order. Could the leverage affect the closing of positions? I have messaged you my account details (9627653.0201USD), please take a look. The image attached shows the short order that was closed in stages when all should have been closed in the first instance. It was not and the exit signal was gone until the final part of the short trade was closed once the exit signal appeared again. 
Attachments: |
closewrong.jpg [164.62 KiB]
Downloaded 345 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
amine_chourou
|
 |
Post subject: Re: Multiple simultaneous orders error |
Post rating: 1
|
Posted: Fri 11 Mar, 2016, 11:32
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
In this example you had 2 situations:
1/ Partial fill Partial fill: 1500000 of 3000000 @ 1.469415 for #392868504 BUY 1.5 mil. EUR/AUD @ MKT MAX SLIPPAGE 0.0005 - Position #102295782 This partial fill was due to the slippage range of 5pips that allowed only the execution of 1.5Mio at the specified price range @22:00:38
2/ Insufficient margin and a request to fill 0.823545Mio instead of 1.5Mio 22:00:38 Order ACCEPTED: #392868512 BUY 1.5 mil. EUR/AUD @ MKT MAX SLIPPAGE 0.0005 - Position #102295782 22:00:38 message Insufficient margin. Filling maximum allowed amount: 823545 and 20mn later when the margin use allowed to close the remaining amount, the close was finally executed: 23:20:59 message Order FILLED at 1.47035 (#392949796 BUY 0.676455 mil. EUR/AUD @ MKT MAX SLIPPAGE 0.0005) - Position #102295782
So the insufficient margin can reject/limit any execution whether it is an opening or closing of positions. So in such situations you can maximize the chances of full execution if you increase the slippage value and if you monitor your open exposure to avoid getting rejected as above.
Cheers
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|