Problem with MT4 Opening a Deal, then Closing it again straight away - page 2

 

you shuld check it in test mode, ti find it repeat or not

 

An EA can pretend to use magic numbers (and even use them most of the time) but due to a coding error (which is the norm in the mql4 spaghetti-code-duplication [copy-pasting] scene) sometimes not use its magic but instead uses some inherently wrong code like for example:

for(...){
   OrderSelect(...);
   if (OrderSymbol() == Symbol()){
      OrderClose(...);
   }
}

which is buried and forgotten between tons of duplicated (and copy-pasted) similar code blocks and for some reason only executed sometimes during full moon (there is another identical 500 line code block (with another 4 occurrences of the same loop) for new moon and another two such blocks for the remaining times in some of the other branches of the one big monster-if/else from hell but these have been "fixed" already).


There you have your error and there your money is gone: Some unknown 15 year old wannabe code duplicator (or should I say C0d3r) with ZERO clue pr0gg3d (sic!) some k3wl (his very first and completely untested) EA (because he got bored with php) and posted it on some forum (or let his 21 year old cousin sell it for money) and caused you a loss of several x-thousand dollars. Ask me privately to where you should send 20% of the saved money for the next 3 months during which you will NOT use these kind of EAs.


This thread should now be closed at exactly this point and then PINNED at the top of the forum with bold red letters until the end of time.

 
Holly mother of ..... one more lemonade and no-one would ask for help on this forum... lol.
 
ubzen:
Holly mother of ..... one more lemonade and no-one would ask for help on this forum... lol.

My rant was twofold.

The part between the lines was primarily directed against those who write and sell these kind of EAs but I doubt they can even understand it. The other part that is written in plain english is only summarizing the event and the situation of the victims and OP is a victim (victim of false claims but also a victim of his own naiveté). The damage cannot be repaired anymore, the money is gone. It can only be learned from and it must be learned from. And finally the last sentence of my post (3 months, 20%) was meant to amplify the perceived pain to maximize the learning effect.


This sounds harsh but it is the bitter truth.


The reason for the error is in one of his EAs that is closing other EA's orders although it pretends to use a magic number it fails to actually use this number sometimes. And this happens because dilettantes are writing and selling dysfunctional EAs to innocent people. The only solution to this problem is to NOT use EAs that have not been audited thoroughly, this automatically includes all commercial EAs for which no source code is available. There is no way around either learning coding or hiring a competent coder and to thoroughly review and test the code of any 3rd party EA and not use any closed source EA at all.

 
I agree with you fully and my earlier post reflected similar sentiment. I taught it was a bit harsh - but it is the truth. Providing an EA without support is a Crime. Yeah - I said it (Maybe now the moderators would really Lock the post in Red). I think the OP made some good money b4 the bugs.... otherwise Ouch!
 

P

> I'm starting to think MT4 may have problems when handling several EAs at the same time

Not normally a problem, I have stacked many more EA's than this per instance and many instances per VPS

> I suspect maybe the indicators are getting screwed up, generating signals to trade and then to close

That could be an idea, especially if this is a'quiet hours' trading EA and the broker has recently gone STP/ECN...?

The resulting huge variations in spread and/or gapping on the shorter timeframes can upset entry/exit signals of various sorts

FWIW

-BB-

 

It's a bug, of some sort. The definition of bug being the software behaving in a manner you would rather it didn't.

It could be either the application program, or the programming language the application was written in.

Either way, without access to either the source code(s), or a reproducible test-case, everything else is assumption.

 

Put each of the EAs into its own separate demo account and additionally open one manually opened trade with far away stop and takeprofit and manually entered limit and stop orders in the same currency pair/pairs in each account and then simply let them all run a few days/weeks. If any of these EAs suddenly decides to close your manually opened trade, move its stop or cancel one of the entry orders then you have undoubtedly identified the guilty EA. Try to sue them to get your money back because an EA MUST NOT sabotage any other trading activity under any circumstances.

This is the #1 Law of trading robotics: "A robot may not harm a human being's trades" (This naturally includes trades from his other EAs)

 

Interesting. Try to set up some sort of prove regarding how an EA is supposed to or not supposed to work.

Then make the big jump, sue and then convince the court about how an EA is supposed to, or not supposed to, work.

Of course, you have to start by explaining to the court what an EA is all about. By that time, your lawyer expenses may be higher than any potential claims the court may award you, assuming again, if that's going to happen. Otherwise, your loses will simply be compounded.

PS: Had another read, someone did de-compile the source, so that makes it easier to argue the case in court. But then is de-compiling and hence stealing the code legal?

 

decompiling the code and stealing it are two different things. Decompiling is just translating it into a readable language. A court should allow to let a document written in a foreign language be translated into a language that the judge can read. Nobody would consider this "stealing".

Or is machine code some kind of sacred language that under no circumstances may ever be translated or read by ordinary mortals? Not even by Judges? Only by the inaugurated programmers and their machines?


And even if not, the same things about the behavior of the EA could also be proven by disassembling the byte code or machine code itself. (disassembling is only printing it in a nicely formatted way and writing a small explanation next to each machine instruction) or by simply demonstrating the behavior in a repeatable test.