error 4063

 

Hi there,

I am having a problem with my EA, everything works fine but when it tries to close an order I get an error 4063, with a message saying " ticket for OrderClose function must be an integer"


can any one point me in the right direction of some documentation on this problem please...or if you have had this error before and fixed it, can you please tell me what you did.


Thank you

 

is not problem... system is telling you that actual(s) are of wrong type.

i offer some suggestions for ur consideration:

.

1. r u sure is type int u are using as actual parameter? (see also below: 3,4,5,6)

2. https://docs.mql4.com/runtime/errors
OrderClose ERR_CUSTOM_INDICATOR_ERROR (4055), ERR_INTEGER_PARAMETER_EXPECTED (4063), ERR_INVALID_FUNCTION_PARAMVALUE (4051), ERR_INVALID_PRICE_PARAM (4107), ERR_INVALID_TICKET (4108), ERR_UNKNOWN_SYMBOL (4106), ERR_TRADE_NOT_ALLOWED (4109), code returned by trade server

.

3. there is no error text as u give: " ticket for OrderClose function must be an integer"

4.

ERR_INTEGER_PARAMETER_EXPECTED 4063 Integer parameter expected.

i see no mention of ticket in above error description...

5.

bool OrderClose( int ticket, double lots, double price, int slippage, color Color=CLR_NONE)

notice: int slippage

6. given error code number that u state, there are maybe TWO parameter candidates for 4063

7. why not re-inspect declarations for all actuals supplied in OrderClose() call

8. Print() statement is vip tool to use all times when questions surface ;)

Best

Reason: