Transfering EA Panel from mq4 to mq5
-
Hi!
I made an expert adviser for the mt4.
There I made a input panel to adjust ordervalues and everything works.
After copy and paste the panel to mq5 the values changed from numbers to numbers.0 (Example from 20 to 20.0)

and if I want to change the values the field shows nothing and my adviser don´t recognize the new values.
It looks like that at stoploss :

As i have done it at mq4 I placed the field at the on init section with a startvalue in specific properties, gave it the same name as my variable.

In tick section it looks like that :

As I said....it works at mq4 but not at mq5.
Does anyone have a solution ?
-
I think the change of the field startvalues from a number like 10 to 10.0 could be the definition as a numeric value.
If I would change this to text code input it should be fixed.....
Or would this be wrong? -
The start values of the drawn fields are successfully transfered into the variable, but every change of the values
won´t be transfered and the field is empty and don´t show the new value...... all trades use only the start values .
Maybe the fields don´t have to be placed into the on Init section at mq5 ?
I hope someone can help to fix this problem.
By the way.....I think it would be good to make a seperate forum for mq5 to have a better overview an because
mq4 and mq5 often needs different solutions.Thanks
Oliver from Germany -
-
@oliverhinrichs Hi Oliver. I'm afraid I cannot offer you ans answer for your issue because I'm not a programmer. I agree that mq4 and mq5 should be in different forums. Unless someone else can provide a solution, my only suggestions is contacting the admin and letting him know.
-
@oliverhinrichs Hello,
Try placing "int" instead of "double" in the variables. That may work since integers will not have decimal places. Yes and also make sure to place "int" only on the values that will not require decimal places.
-
@l-andorrà Thankyou

-
Hi Carpenter!
I changed the variables from double to int and ich changed the input field values from numeric to text code input to get numbers without .0
but it still don´t work.
When I click into the input field i can see that the startvalue is highlighted blue and flickers which I think could be the reason that the metatrader 5
walks thru this field on every tick.
But when I change the value of the input field the field is empty and the metatrader use only the startvalues.

I have no idea how to fix this
-
Update!
I tried my expert on a Demo account and i get the errormessage that my expert tried to place an order with 0 lots.
So i think the whole think with these input fields seems to be not working on MT5.
-
@oliverhinrichs Are you sure your broker cann accept 0.01 lots trades?
-
@l-andorrà Yes Sir

-
@oliverhinrichs Then my only suggestion is rebuilding it from scratch block to block.
Probably you will spend less time than searching the error. -
-
@oliverhinrichs could you share the first panel concept? (MT4 project) please