Help to correct the indicator. It does not work, although no error, no warning.

 
#property indicator_chart_window
 #property indicator_buffers 2
 
 extern string Start     = "5:17";  
 extern double Timer     =    2.0;
 extern int    Hystory   =     2000;  
        double Buf_U[], 
               Buf_D[];
        string S; 
                  
 //+------------------------------------------------------------------+
 //|                                                                  |
 //+------------------------------------------------------------------+
 
 int OnInit() 
 {
  
  SetIndexBuffer(0,Buf_U);
  SetIndexBuffer(1,Buf_D); 
  SetIndexStyle (0,DRAW_ARROW,STYLE_SOLID,2,clrPaleGoldenrod);
  SetIndexStyle (1,DRAW_ARROW,STYLE_SOLID,2,clrPaleGoldenrod);
  SetIndexArrow (0,241);
  SetIndexArrow (1,242);
 
  S = TimeToStr(StrToTime(Start),TIME_MINUTES); 
  
  return(0);
 }
 
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

 int start()   
 {
  int counted_bars = IndicatorCounted();
  if(counted_bars < 0)  return(-1);
  if(counted_bars > 0)  counted_bars--; 
  for(int i=0; i<Hystory; i++)               
  { 
   string TIME  = TimeToStr(Time[i],TIME_MINUTES);
   double Delta = (int)(Time[i]+PeriodSeconds()-TimeCurrent()); 
   if((DayOfWeek()== MONDAY) && (TIME == S && Delta <= Timer))  
   {
    if(Close[i+0])
     Buf_U[i+0] = Low[i+0];
  
    if(Close[i+0])
     Buf_D[i+0] = High[i+0];     
   }
  } 
  return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
  
 
Sen999:

there is no logic in the

if(Close[i+0])
 
Nikolay Georgiev:

there is no logic in the

Can you please advise me how i can change to correct it?

 
Sen999: Can you please advise me how i can change to correct it?

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

What you wrote is moronic. Prices are non-zero. Non-zero is true. What you wrote was if(true).

 
William Roeder:

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

What you wrote is moronic. Prices are non-zero. Non-zero is true. What you wrote was if(true).

Hello. Yes I really expect to get the answer. Pls engliht me
 
Sen999:

Can you please advise me how i can change to correct it?

Well first you need to explain what are you trying to accomplish with your code. Makes sense, right?

 
Nikolay Georgiev:

Well first you need to explain what are you trying to accomplish with your code. Makes sense, right?

Hello. I want to build an indicator will issue signlals at a certain time of day and certain day of week with only signal buy or sell ( it means onlt 1 buffer). Example given The indicator will generate the buy (up) signal only 4:12 every Friday.
 
Sen999:
Hello. I want to build an indicator will issue signlals at a certain time of day and certain day of week with only signal buy or sell ( it means onlt 1 buffer). Example given The indicator will generate the buy (up) signal only 4:12 every Friday.

What will be the condition behind the signal ?

 
Nikolay Georgiev:

What will be the condition behind the signal ?

There is no condition. There signals up or down is generted at that time. It means that every 4:12 every Friday there is up signals
 
Sen999:

Topics concerning MT4 and MQL4 have their own section.

In future please post in the correct section.

I will move your topic to the MQL4 and Metatrader 4 section.

 

Sen999: I want to build an indicator will issue signlals at a certain time of day\

There is no condition. There signals up or down is generted at that time. It means that every 4:12 every Friday there is up signals

When is one thing, the signal is another. What signal? Unless you can specify it on concrete terms, it can not be coded.

Nikolay Georgiev: What will be the condition behind the signal ?

Why are you ignoring questions asked?