Clearing an array of defined element(s) - page 26

 
Stanislav Dray:

different machines have different results, varying by almost a factor of two, so it's not even clear if it makes sense at all

It's not even on different machines, but the script is run several times at once. And the results will be different. With the filtering vector it somehow has no effect, but on the rest you can see the jumps.

 
Konstantin Nikitin:

Not even on different machines, but running the script several times at once. And there will be different results. With filtering vector it somehow doesn't affect it, but on others we can see jumps.

Well, I have the opposite. The filtering vector is radically different from yours. I think you need to add a loop of passes with changing input data and choose an average, that would be more or less correct.

 

In MT4 tested

MT5

Both files are in the project


P.S. Who wants to use their own functions, write them yourself. There is a directory for them in the project.

 
Please tell me how to "resize" the second dimension of the array...-thank you!
 
Nikolay Gaylis:
Please tell me how to "resize" the second dimension of the array...-thank you!

Array[][5]

 
Nikolay Gaylis:
How to "resize" the second dimension of an array...-thank you!

Use structures in such cases. It's more convenient to work with.

struct SMySruct
{
     int ticket[];
     double price[];
     string symbol[];
} MySruct[];

void OnStart()
{
     if( ArrayResize(MySruct, 10)==10)
     {
          for(int i=0; i<ArraySize(MySruct); i++)
          {
               ArrayResize(MySruct[i].ticket, 5);
               ArrayResize(MySruct[i].price, 5);
               ArrayResize(MySruct[i].symbol, 5);
          }
     }
}
 
Vitaly Muzichenko:

Array[][5]

variable)

 
Nikolay Gaylis:

variable)

Do it with a margin, it won't be a problem.

 
Konstantin Nikitin:

Tested in MT4

MT5

Both files are in the project


P.S. Who wants to use their own functions, write them yourself. The directory for them in the project is.

It would be nice to have write access

 
Stanislav Dray:

Well, then it's not a bad idea to get write rights

Ran across the topic pasted many. Who forgot to write.

P.S. And in general, not order, however. This is for developers. Maybe a checkbox for public "Allow all to read/write" is needed