Download MetaTrader 5
To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
LanceHardwood
36
LanceHardwood 2016.02.02 19:35 

+--ALL IS DONE IN MQL4--+


i have a problem with my trading algorithm, i tried the expert advisor in the strategy tester and it works perfectly, yet when i attempt to do it in a live demo it gives me a notification that my price target hit... buy my order never executes. I HAVE turned on the auto trading button on top. I ALLOWED the autotrading in options. I CHECKED the "allow live trading" when i open my ea. I have no idea what i did wrong:

my code:

           
            int ticket = OrderSend("EURUSD", OP_SELL, double(PosSizeShort), Ask, 5, Ask - 10, Ask + 10);
            if(ticket<0)
            {
               Print("OrderSend failed with error #",GetLastError());
            }
            else
            {
               Print("OrderSend placed successfully");                  
            }

-------Please HELP----------

thanks for responses

Alain Verleyen
Moderator
28517
Alain Verleyen 2016.02.02 19:51  
What is printed in the logs ?
LanceHardwood
36
LanceHardwood 2016.02.02 23:56  
Alain Verleyen:
What is printed in the logs ?
2016.02.02 23:52:39.227    '11212095': order was opened : #3160985 buy 5.00 EURUSD at 1.09264 sl: 1.09036 tp: 1.09424


+--I also have another problem--+:

now the ea willl only open longs, but no shorts although i programmed it to place shorts and not the right order amount

/
To add comments, please log in or register