Download MetaTrader 5

EA not picking trades

To add comments, please log in or register
Opengates 2015.11.16 01:59 

Hello Everybody,

Please I need your help. I made this ea to pick trades on news release but when the time set is reached it doesn't pick trades.

Take a look at the code below maybe there is something I am doing wrong: Thanks in advance

extern string        newsdate         = "2015.06.10"; // Date for the News to be released
extern string        newstime         = "14:00";   // Time for the News to be released

datetime Cur_time=TimeCurrent();
string   timedate=StringConcatenate(newsdate," ",newstime);
datetime Starttime=StrToTime(timedate); 

 if(Cur_time>=Starttime && clear_to_send) { 
    clear_to_send=false;   }    
Keith Watford
Keith Watford 2015.11.16 02:38  

Check if an OrderSend fails and print the error

Where is clear_to_send set to true? 

Why are you calculating Stoploss and Take profits on Bid and Ask? They should be calculated from the entry price. 

To add comments, please log in or register