Errors, bugs, questions - page 1389

 

Good afternoon!

Studying, trying to fix expert. In code editor, in debug mode, there are two ways, by ticks and by history.

For some reason I cannot run a history test, this line is not active. The instructions show: fill in the table in settings and that's all.

But the line "Start on historical data" is not active????????????????????

 
Fantomas:

Good afternoon!

Studying, trying to fix expert. In code editor, in debug mode, there are two ways, by ticks and by history.

For some reason I cannot run a history test, this line is not active. The instructions show: fill in the table in settings and that's it.

But the line "Start on historical data" is not active????????????????????

Have you filled in the fields in MetaEditor in this way and pressed the right button?

1

 
Karputov Vladimir:

Did you fill in the fields in MetaEditor this way and click on the right button?


Yes, filled in this table, put a breakpoint.

Now in the menu "Debug" the first two lines.

1. Start on real data------- It is active

2. On historical data--------- stubbornly not active.

 
Fantomas:

Yes, filled in this table, put a breakpoint.

Now in the Debug menu the first two lines.

1. Start on real data------- It is active

2. On historical data--------- stubbornly not active.

Latest build of the terminal?
 
Tapochun:
The latest build of the terminal?
Probably 880
 
Fantomas:
Probably 880

Indeed, in MT5 build 1159 32 bit debugging on history is available, but in MT4 build 891 32 bit debugging on history is not available:

You can't test on history. MT4 build 891

 
Karputov Vladimir:

Indeed, in MT5 build 1159 32 bit debugging on history is available and in MT4 build 891 32 bit debugging on history is not available:


Thank you all for your time!!!

 
Alexandr Bryzgalov:

so it's really not an error?

It really is. Even so, it's more likely to be for (;;)

 
Комбинатор:

Indeed. Even so, it is likely to be possible for (;;;)

Yeah, I read it in the help )
 

Hi all, I mostly write in mql4, but decided to start working on mql5 and had a problem.

I am using Ishimoku readings in my indicator. It doesn't update the data and keeps showing error 4806.

void OnInit(){
   int i_ich=INVALID_HANDLE;
   i_ich=iIchimoku(Symbol(), Period(), 9, 26, 52);
   WaitInd(i_ich, "Ишимоку");     
}

void WaitInd(int hnd, string name, int wait=10){
   if(hnd==INVALID_HANDLE){
      return;
   }
   double Arr[];
   datetime now=TimeLocal();
   Comment("Ждем построения индикатора ",name,"...");
   GetLastError();
   while(CopyBuffer(hnd, 0, 0, 1, Arr)<=0){
      int err=GetLastError();
      if(err!=4806){
         PrintFormat("Ошибка %d при получении данных инликатора %s",err,name);
         Comment("");
         return;
      }
      if(TimeLocal()-now>=wait){
         PrintFormat("Ошибка: индикатор %s не построился за %d секунд",name,wait);
         Comment("");
         return;
      }
   }
   Comment("");
}

int OnCalculate(const int rates_total,
                    const int prev_calculated,
                    const datetime& time[],
                    const double& open[],
                    const double& high[],
                    const double& low[],
                    const double& close[],
                    const long& tick_volume[],
                    const long& volume[],
                    const int& spread[]){
       
       return(rates_total);
}

The same code, if I use it in script, it does not show any error, indicator is build instantly. What may be the problem?

Reason: