M1 chart missing bars

 

Good day!

I tried to write an EA recently, everything turned out almost normal, opens transactions by time.

The problem now is the time, for example, need to open a deal at 8 34 and the bar does not look at the minute is first 8 33 then immediately 8 35, analyzed another chart, I noticed that some minutes, as well there.

Please advise how to reopen the deal, for example after a minute, etc. until a deal is opened.

 
What difference does it make what opening time the bar has? It's just the next one.
 

In the Strategy Tester my Expert Advisor performs deals and even shows good results

I ran it on a real account, compiled it in the editor and loaded a set, but it does not trade (just does not open deals).

I do not know what is the reason.

 
Are there any errors in the logbook ?
 
DanLett:

What's the reason?!

I think this is the quickest place to help. Just don't write to them, they get angry))
 
no errors in the logbook ...
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
extern string ____0___ = "+++++Время SELL-а+++++++++++++";         //|
extern int sH=8;                                                   //|
extern int sM=35;                                                  //|
extern int sH2=11;                                                 //|
extern int sM2=5; 
extern int sH3=11;                                                 //|
extern int sM3=5;                                                 //|
extern string ____1___ = "+++++Время BUY-а++++++++++++++";         //|
extern int bH=17;                                                  //|
extern int bM=55;                                                  //|
extern int bH2=16;                                                 //|
extern int bM2=5; 
extern int bH3=16;                                                 //|
extern int bM3=5;                                                 //|
extern string ____4___ = "+++++Все остальное++++++++++++";         //|
extern int Tp=34;                                                  //|  
extern int Sl=55;                                                  //|
extern double Prosadka=22;                                         //|           
extern string ____5___ = "йоу!)";                                  //|     
extern color Cvet=Red;                                             //|
int ticket;                                                        //|      
                                                       
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|

int start()
  {
   if((OrdersTotal()==0 && Hour()==sH && Minute()==sM)||(OrdersTotal()==0 && Hour()==sH2 && Minute()==sM2)||
    (OrdersTotal()==0 && Hour()==sH3 && Minute()==sM3))
      {
     
      OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,0,Ask+Sl*Point,Ask-Tp*Point,"DLSexp",123,0,Cvet);//открываем сделку
      } 
      
      else   
         
   if((OrdersTotal()==0 && Hour()==bH && Minute()==bM)||(OrdersTotal()==0 && Hour()==bH2 && Minute()==bM2) ||
    (OrdersTotal()==0 && Hour()==bH3 && Minute()==bM3))
      {
   
      OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,0,Bid-Sl*Point,Bid+Tp*Point,"DLSexp",124,0,Cvet);//открываем сделку
      } 
         
   }       


 //++++++++++++ОПТИМИЗАЦИЯ ЛОТА+++++++++++++++
  double LotsOptimized()
  {
  double lot;
  lot=NormalizeDouble(AccountFreeMargin()/100.0/Prosadka,2);
  
  if(lot<0.01)
  return(0.01);
  else return(lot);
  }
  //++++++++++++++++++++++++++++++++++++++++++
     
 int init()
 {
 Comment("TP=",Tp,"\n","SL=",Sl);//Коментим в левом верхнем углу
 }    
 
       
 
Maybe there's an error in the code, but it compiles. in the test it trades, but in the replay it doesn't.
 
Help me out here...
 
DanLett:

The conditions you set are too stringent. They may not be met
 
DanLett:
Max, but you have to realise that opening orders by time is too easy to stretch the market.
Reason: