//+------------------------------------------------------------------+ //| GBP9AM.mq4 | //| forxexpoolo | //| | //+------------------------------------------------------------------+ #property copyright "forxexpoolo, coded by Michal Rutka" #property link "" /* Attach to GBPUSD chart. Timeframe is not important. System should put trades on 9AM London time. I looking for system automat wich will be trade for me this 9:00 GMT look for price GBP/USD then price is 1.8230example (bid) Robot do for me order waiting position long and short open long 18pips+4pips spread at this price so will be LONG 1.8252 profit 40pips stop 22pips And short open short 22pips-4pipsspread so 1.8230-22-4=1.8204 so 1.8204 short profit 40pips stop 18pips AND MAJOR IF I OPEN LONG POSITION AUTOMAT CANCEL SHORT POSITION This system work nice month week day ? I will be glad if I see this in .mq4 code Version: Date: Comment: -------------------------------- 1.0 2005.10.16 First version according to the idea. 1.1 2005.10.17 Bug removed (closing active orders when fired at the look hour and issuing new wrong pair of orders). Added close hour, request of Movieweb. 1.2 2005.10.18 Bug removed (allowing more than one trades per day, e.g. 2005.07.20) 1.3 2005.10.19 Feature added: look_price_min. */ extern int look_price_hour=10; // Change for your time zone (my is +1 Hour). Should be 9AM London time. extern int look_price_min =0; // Offset in minutes when to look on price. extern int close_hour =18; // Close all orders after this hour extern bool use_close_hour=true; // set it to false to ignore close_hour extern int take_profit =40; extern int open_long =18; extern int open_short =22; extern int stop_long =22; extern int stop_short =18; extern int slippage =0; // Put what your brooker requires extern double lots =0.1; // Position size extern int magic =20051016; //---- bool clear_to_send =true; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void ReportStrategy() { int totalorders =HistoryTotal(); double StrategyProfit =0.0; double StrategyProfitOpen=0.0; int StrategyOrders =0; int StrategyOrdersOpen=0; for(int j=0; j=close_hour && use_close_hour) { // we are after closing time int totalorders=OrdersTotal(); for(int j=0;j=look_price_min && clear_to_send) { // Probably I need to close any old positions first: totalorders=OrdersTotal(); for(j=0;j=look_price_min) clear_to_send=true; if(Hour()==(look_price_hour-1) && MathAbs(Minute() - look_price_min) < 10) clear_to_send=true; } //---- return(0); } //+------------------------------------------------------------------+