Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 362

 

Thank you all, I have attached the emulatorIndicatorCounted() from the articleand tweaked the buffers, it seems to be working, I will test it, I recommend the article, it helped.

 

One thing if I may.

 double pick_buffer[1];
  for(int n=ArraySize(ExtMapBuffer1)-1,ii=0;n>=0;n--,ii++)
   {
     if(ExtMapBuffer1[n]!=0)
     {
    
     pick_buffer[ii]=ExtMapBuffer1[n];//тут вылетает!!!!
      if(n!=0){ ArrayResize(pick_buffer,ArraySize(pick_buffer)+1);}
     Print("next pick is ",ExtMapBuffer1[n]);
     }
   }

did everything I could fuse on the fuse, still an error-array overruns can't figure it out myself

I have it figured out, ArraySize only works with dynamic arrays.

Can you tell me how to test the EA when the market is closed?

 
ijonhson:

One thing if I may.

did everything I could fuse on the fuse, still an error-array overruns can't figure it out myself

I have it figured out, ArraySize only works with dynamic arrays.

Can you tell me how to test the Expert Advisor when the market is closed?

You have been told many times that you are going the wrong way. It gets worse from here.

If you really want to include the indicator into your EA, you should just look at what the indicator does at each iteration of the loop and make all these actions as a function. Then, you need to find the necessary data in the EA during the loop using this function and save the necessary data in an array. And the time of the most recent data found.

And there is no need to do the loop on every tick - it is superfluous. With opening of a new bar you are just searching for missing data - you have a time of the most recent data - so you are searching only till this time.

ArraySize() works with any arrays.
 
ijonhson: Can you tell me how to test an EA when the market is closed?

When the market is closed, disconnected Internet, check the Expert Advisor on historical data

Tester, built into the terminal, will help

 

Everything repeats itself.

What was asked ten years ago is being asked now. It's getting scary. There seems to be no evolution.

Although there is one difference - the number of clever generators of ideas has significantly decreased.

And this is already a regression.

 
Victor Nikolaev: The number of clever idea-generators has significantly decreased.

And this is already a regression.

We are getting old ...

 
STARIJ:

Getting old...


The answer is not correct. The system of thinking has changed. And it's hard to do anything about it anymore.

 
Victor Nikolaev:

The answer is not correct. The system of thinking has changed. And it is hard to do anything about it anymore.

We have to go back to the Soviet education system. And the sooner we do, the less we will lose in the future. But this is a digression from the subject...
 
Artyom Trishkin:
We must return to the Soviet system of education. And the sooner the better, the fewer losses in the future. But this is a digression from the topic ...

Unfortunately, I now work in the education system. A return is impossible.

The Soviet education system is still only alive in Israel.

Although it is more correct to call it Russian (pre-revolutionary), although something is also taken from the Soviet system.

 
Victor Nikolaev:

Unfortunately, I now work in the education system. A return is impossible.

The Soviet education system is still only alive in Israel.

Although it is more correct to call it Russian (pre-revolutionary), although something is also taken from the Soviet system.

Open a public school with its own curriculum