(ERROR) Expert not placing stop losses.

 

Client Terminal Build and Version (32 or 64 bit)

MT4 ver 4.988 With Compiler ver. 5.1351 

Problem description

Compiler doesn't create EX4 version that places stop losses, while previous compilers do compile an EX4 that places stop losses.

Previous versions of MT4 4.950 and Compiler version 5.1241

Please Anyone knows what is the reason for this, or how to solve it?


 
PCWalker:

Client Terminal Build and Version (32 or 64 bit)

MT4 ver 4.988 With Compiler ver. 5.1351 

Problem description

Compiler doesn't create EX4 version that places stop losses, while previous compilers do compile an EX4 that places stop losses.

Previous versions of MT4 4.950 and Compiler version 5.1241

Please Anyone knows what is the reason for this, or how to solve it?


Of course we can not say anything without the error code.
 
Marco vd Heijden:
Of course we can not say anything without the error code.
It doesn't have an error code because it is not an error in the compiled file, it is a logical bug in the compiler, that creates the EX4 which doesn't place stop loss on order but previous version compilers do create EX4 that place stop loss with the same exact code.
 
I have the same problem with MT5 new build 1375. It is not placing a SL. The funniest is that if I debug the code with the tester, the stop loss is set normally. But when running the EA live, SL is always 0. There should be an error returned because I use the standard library, but no.
 
twalk:
I have the same problem with MT5 new build 1375. It is not placing a SL. The funniest is that if I debug the code with the tester, the stop loss is set normally. But when running the EA live, SL is always 0. There should be an error returned because I use the standard library, but no.
I hope they solve it soon.
 
maybe your code is wrong.
 
Nguyen Nga:
maybe your code is wrong.

The code is not wrong, it is exactly the same code, I have checked it number of times. And You can see the the this tread there is another user experiencing the same problem.

Here is the problem: The first pic is of the new terminal with the new compiler EX4, and the second pic is an older version of the terminal with older version of the compiler.

 with no stop loss places on the orders.

 Here is the same EA with stop losses placed. 

Note it is the same code of the EA, I didn't change anything. 

 
PCWalker 2016.07.22 13:21

The reason is that there are no errors while compiling, and the code is working well on the old compiler, with stops as you can see above.

But in the new compiler the stops are not placed as I can see again in the pictures I attached. 

 

Support Team 2016.07.22 14:23

You cannot place the stops in the compiler, it works in teminal. Did you check Experts tab? Does it have any errors with order's SL modification?


Thank you for your kind information.

Let me explain to you a little about compilers, the are these softwares that get a string of characters, which are easy for humans to read and write, so that it will not be very hard for them to write software in 0s and 1s... then the compiler converts the code in the high level language into machine language, which can run much faster.

There are two kinds of errors that are possible while compiling, logical error, and syntax error. now even compilers are software that can have logical errors and syntax errors, My problem with your compiler, is that the old versions of the compilers create the experts file that do place a stop loss when running in the terminal. But with the same code in the new compiler and no error codes while compiling the compiler creates an expert file EX4 that doesn't place stop loses in the terminal.

I hope now you understand why I have sent you the two screen shots.

By the way, if you have any problem understanding what I have explained you can refer to the forum in the following address.

https://www.mql5.com/en/forum/92066#comment_2672307 

Thank you. 

(ERROR) Expert not placing stop losses.
(ERROR) Expert not placing stop losses.
  • reviews: 18
  • www.mql5.com
Client Terminal Build and Version (32 or 64 bit) MT4 ver 4.988 With Compiler ver. 5...
 
PCWalker:
PCWalker 2016.07.22 13:21

The reason is that there are no errors while compiling, and the code is working well on the old compiler, with stops as you can see above.

But in the new compiler the stops are not placed as I can see again in the pictures I attached. 

 

Support Team 2016.07.22 14:23

You cannot place the stops in the compiler, it works in teminal. Did you check Experts tab? Does it have any errors with order's SL modification?


Thank you for your kind information.

Let me explain to you a little about compilers, the are these softwares that get a string of characters, which are easy for humans to read and write, so that it will not be very hard for them to write software in 0s and 1s... then the compiler converts the code in the high level language into machine language, which can run much faster.

There are two kinds of errors that are possible while compiling, logical error, and syntax error. now even compilers are software that can have logical errors and syntax errors, My problem with your compiler, is that the old versions of the compilers create the experts file that do place a stop loss when running in the terminal. But with the same code in the new compiler and no error codes while compiling the compiler creates an expert file EX4 that doesn't place stop loses in the terminal.

I hope now you understand why I have sent you the two screen shots.

By the way, if you have any problem understanding what I have explained you can refer to the forum in the following address.

https://www.mql5.com/en/forum/92066#comment_2672307 

Thank you. 

Well in any case this:

Is certainly NOT the same as this:

So i think you should study the code because if the robot uses

Symbol();
_Symbol;
SymbolName(x,1);
OrderSymbol();

Or any derivative, then having a + after your symbol name can and most likely will cause problems.

 
Marco vd Heijden:

Well in any case this:

Is certainly NOT the same as this:

So i think you should study the code because if the robot uses

Or any derivative, then having a + after your symbol name can and most likely will cause problems.

Thank you for your response. 

No I have checked that also, while using the same code in a compiler for a terminal that doesn't have any suffix for the symbol even there it is not placing the stop loss.

So not having the suffix or any addition doesn't change the problem, and the EX4 file is not placing the stop loss. in the new version terminal and compilers. 

 

 What is your code to place order ? Let check it on same MT4.

other if your broker is ECN, it maybe not allow place SL/TP when you place order. 

Reason: