Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I found the error.
Just added a minus sign before stoploss
if (Profit>= takeprofit || Profit<=(-stoploss))
It seems the expert working well.
But I have the warning yet:
return value of 'OrderClose' should be checked last.mq4 198 8 (in section 4-2-4)
for this line:(section 4-2-4)
Can this make an error or disfunction in future.?
How can I fix it?
OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Red);
Dear Friends
I have fixed the errors... Expert is now working well.
but I have one warning:
return value of 'OrderClose' should be checked last.mq4 198 8 (in section 4-2-4)
for this line:(section 4-2-4)
Can this make an error or disfunction in future.?
How can I fix it?
i m nt able to close when the profit is 0.05..wht is the exact code to close whn the profit of a trade is 0.05..check the screenshot
Show your code so far.
I think that all answers have been given in this thread already.