markft wrote:Chances are this will still occur in 1.9.9. In my testing when I had quite a few charts open at the same time I have noticed something quite bad occurred intermittently, which I think may be due to a Empty4 bug.fx8000 wrote:Looking through the demo account statement I posted earlier, I spotted several instances of either no SL being set or wrong SL being executed on closed trades. This was using version 1.9.5. SL was set at default 38.
I have now changed to version 1.9.9 and will report again if the same problem persists.
Cheers,
Peter
The issue is:
More than one instance of the EA tries to send an order at around the same time e.g. EU and GU try to send an order simultaneously. Very rarely I have seen the ticket number returned to the EU EA is a GU position and vice versa. Then, since this is an ECN crim the EU EA sends the SL and TP for EU to the GU trade; hence the incorrect SL and TPs.
I have added an alert where I check the currency pair of the ticket and if it doesn't match the chart currency an alert is raised. I have observed my Empty4 do this for a while and then get into a correct state afterwards. I looked into this carefully and do not think this is a bug in the EA code itself; but rather in Empty4. It likely unlocks the trading thread at a point where it is not yet safe and so overwrites some shared resource and returns an incorrect ticket.
Since this seemed to occur when I was running the EA in M1 charts for testing only, I think the likelihood of this occurring on H1/H4 should be slim. Regardless anything that can happen will happen.
I have incorporated Mike's "lock trading thread" functions into the next version of the EA so we can do the locking in the EA itself and therefore resolve this issue.
What you have observed may be the same issue if you are using an ECN crim. Can you please confirm? Also do you see any error messages in the experts log that says the returned ticket is not correct?
Kind Regards,
Mahmut
Hi Mahmut,
The answer to your first question is : I do not know if FXDD is ECN criminal. I tend to set ECN options to true for all my demos.
I have looked at the experts log files and the only error message I could find is SL/TP order modify failed with error (130) : invalid stops.
Cheers,
Peter