You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Friends:
I'm sorry I didn't answer before: I was unaware of your posts because I received no notification from Metaquotes. I indeed opened a ticked, as RaptorUK recommended, but they never answered it at all. I do the same as JamesMadden when neccessary: I just close the order and loose the spread. If it's not that risky, I just leave it there! (if my EA is profitable, it will win more than loose in the long run) However, of course I don't like the bug.
Now I am having new problems with build 600 and I'd like to know, if someone knows, how do you get them to answer? :)
PD: How do I get this web application to send me an email when this post gets updated? I am already subscribed to the topic.
Hi Friends:
I'm sorry I didn't answer before: I was unaware of your posts because I received no notification from Metaquotes. I indeed opened a ticked, as RaptorUK recommended, but they never answered it at all. I do the same as JamesMadden when neccessary: I just close the order and loose the spread. If it's not that risky, I just leave it there! (if my EA is profitable, it will win more than loose in the long run) However, of course I don't like the bug.
Now I am having new problems with build 600 and I'd like to know, if someone knows, how do you get them to answer? :)
PD: How do I get this web application to send me an email when this post gets updated? I am already subscribed to the topic.
when you find out let me know . . . I have an open ticket from March 2013 that has never had a reply. All I can suggest is to keep adding new comments each time asking for news or a reply.
email notifications haven't worked for a few years . . . perhaps you could report it to the Service Desk
Hi,
I just found this topic because I went searching for exactly this problem. I haven't noticed the problem before but it happened for me today.
Regardless of the experts log, which like mentioned earlier does record trades, there is the MetaTrader journal which records all trades made, by EA or by person. Today I found a trade in my portfolio that was a duplicate of a trade placed only seconds earlier but the second trade did not appear in the experts log or the MetaTrader journal.
I've asked my broker to compare their logs of incoming requests with trades executed but I suspect they either do not keep logs or will not want to investigate.
If the EA did place 2 orders I would expect to see both in the journal. Even if the desktop application for some reason duplicated the request I would expect the server to respond and record the second trade. It appears more that the trade is being executed from the server and not the client.
This is the first time I've noticed the problem and I can't find any way to reproduce the issue. The amounts I'm working with now are very small so the value isn't important but it does raise concern over the viability of MetaTrader.
Just thought I'd lend my thoughts to a topic that's been hanging around for a while.
Edit:
I've been checking further and found another instance. The order had already been closed by stop loss so I didn't notice it. In both cases the EA placed an expected order. That shows in the journal immediately followed by a login message which corresponds with the phantom order being placed.
If anyone else thinks a phantom order has occurred please check for the login message in the journal. It may be significant.
Seems like I'm not the only one affected by this annoying problem. Same as spikedog, my EA requested for a market order that resulted in another duplicated entry of the same lotsize within millisecs, duplicate order log was shown in Journal but not Experts tab; I've since modified my codes slightly to hopefully better guard against this problem by filtering double trade within the same bar (trading on bar open only) right before OrderSend().
It's the first time I had this duplicate trade problem; had opened more than 500 trades with 3 brokers since & no problem until now. Btw, the subsequent trades works fine again.
As attached is my code to process OrderSend() when the duplicate problem happens. I can't see how my EA is the cause for the duplicate order. Only possible reason I can think of right now is perhaps on a very rare occasion, the server was processing my OrderSend but returns "-1" somehow & my EA proceeds to make another request treating the 1st as a requote. Just my mere speculation.
I can't see how my EA is the cause for the duplicate order.
It might be connected with this error in your code, you should fix it and test again . . .
OrderSend() returns an int not a bool so checking if the return value is "true" is incorrect.
@BigFisherman
B.T.W what's going on with yor code ?
and again ?
It might be connected with this error in your code, you should fix it and test again . . .
OrderSend() returns an int not a bool so checking if the return value is "true" is incorrect.
Thanks raptoruk for the suggestion. You are right :)
Thanks raptoruk for the suggestion. I'm aware of that. However I don't think that's the cause for the duplicate trade because the code presented is valid, though little confusing.
How is the code valid ? if the OrderSend() works you get a value greater than 0 returned, i.e the ticket number, if it fails you get -1 you are testing for true or false . . . fix your code and remove the uncertainty.
Thanks again.
Cheers!
How is the code valid ? if the OrderSend() works you get a value greater than 0 returned, i.e the ticket number, if it fails you get -1 returned, you are testing for true or false . . . fix your code and remove the uncertainty.
Hi RaptorUK,
I've a question not exactly regarding the topic of this thread but hoping to use my previous post as an example to deepen my understanding of mql4 coding & perhaps may also help other beginners like myself (if u think it's off-topic & needs a new thread, please delete this & let me know).
I was slightly confused at first about my initial way of declaring Buy_Ticket as bool rather than int, so I did further tests on it. While I agree my original way of reading OrderSend() as bool is not a good way of coding (confusing), but my test shows it's valid. To make it simpler for reading, I've coded the following, please advice & thanks for your time.
P.S.: As advised, I've already modified my EA to read OrderSend() as int.
Journal