The same EA works fine on Instaforex and ICMarkets. but it does not work when I attached the EA to the charts of BTG MT4. I put a Print just before OrderSend() function, the print message shows buy/sell signals are generated as expected, but the OrderSend() mysteriously stops working. Autotrade is enabled. the broker confirmed there is no problem at his end. Could this be a bug?
Your code is wrong..
In case of erro ticket is -1
Returns number of the ticket assigned to the order by the trade server or -1 if it fails.
I also have problem where one EA works for certain broker but not for other broker. It can be lot problem, spread problem, currency pair problem, etc as the list can keep going on.
However, for me, the only problem that I manage to catch is the digit (dot after zero) problem and currency pair symbol used problem. I fix it and it works again.
I have the following code in place, so the problem should not be spread or digits.
if (Digits == 5||Digits == 3)
pt = 10*Point;
pt = Point;
slip = MathCeil((Ask - Bid)/pt);
To add comments, please log in or register