Error Opening Order 4051

 

Hello,

since few days i get to often this erros message, i think it have to do with the new MT4 build update, does somebody know why this error does appear now and how to slove it?

i know that the error mean invalid parameter for a function, but i dont have change the parameters they have work before also, so this have somethink to do with new MT4 Update and its not easy to find the reason why this error comes now.

 
PlanandTrade:

Hello,

since few days i get to often this erros message, i think it have to do with the new MT4 build update, does somebody know why this error does appear now and how to slove it?

i know that the error mean invalid parameter for a function, but i dont have change the parameters they have work before also, so this have somethink to do with new MT4 Update and its not easy to find the reason why this error comes now.

The problem is in the code.
 
But how does it come to such invalid function parameter error message when all parameters have the correct typ?
 
who knows show the code and maybe another set of eyes will find it
 
the code is to big, i dont think somebody have the time to look to my complete EA code. But i did think that other people also have ge the same problem since the new MT4 Update and then maybe somebody know exactly why this happen now and how to slove it.
 

no need the entire code the relevant code only

b.t.w. you'd be surprised what people in this community are willing to do to help others even reading your entire code

 
I have find now how to slove this problem, it was not enough to look that all parameters for the function have the right type, i have also check if the values from the parameters are not like -1 for OrderSend() and such thinks, Ask price not = 0 and such thinks. That have help me to slove this error now. Thanks everybody for your tips.
Reason: