Features of the mql5 language, subtleties and tricks - page 164

 
Vict:

What code pages, what are you talking about? The "special codes" define the number of bytes to encode a character because the encoding is of variable length. UTF-8 can encode any Unicode character as well as UTF-16. And utf-16 with variable length (surrogate pairs).

The task of discussing Unicode is not the task here.

 
Edgar Akhmadeev:

That's not all.

As ANSI Cyrillic = CP1251, so

Unicode:

UTF-8 = CP65001, // UNIX/Linux

UTF-16LE = CP1200, // Windows

UTF-16BE = CP1251,

UTF-32LE = ?

UTF-32BE = ?

ISO10646:

UCS-2 ~ UTF-16

UCS-4 = UTF-32

Confusion? No, we haven't.

Exactly, different platform architectures, that's why on Windows everyone says UTF-16LE/BE
Because the Windows terminal is written for Windows, got it ))

 
 
ArrayCopy makes it easy to rebuild 'matrices'.
void OnStart()
{
  int Array1[];
  int Array2[][2];
  
  ArrayResize(Array1, 6);
  
  Array1[0] = 0;
  Array1[1] = 1;
  Array1[2] = 2;
  Array1[3] = 3;
  Array1[4] = 4;
  Array1[5] = 5;
  
  Print(ArrayCopy(Array2, Array1));

  ArrayPrint(Array2);      
}


    [,0][,1]
[0,]   0   1
[1,]   2   3
[2,]   4   5


It's a pity ArraySwap can't do that.

 
To enable profiling the EA on real data, I add these lines to it.
const int TimeToStop = 100 * EventSetTimer(1); // Сколько секунд на профилирование.

void OnTimer()
{
  static int Timer = 0;
  
  if (Timer++ >= TimeToStop)
    ExpertRemove();
}
 
fxsaber:
To enable profiling the EA on real data, I add these lines to it.

What's wrong with manually stopping the profiler?

 
Andrey Khatimlianskii:

What's wrong with manually stopping the profiler?

Manual stop does not produce profiling results, unfortunately.

 
fxsaber:

Manual stop does not produce profiling results, unfortunately.

There must be a problem with the code. It works for me.

 
fxsaber:

Manual stop does not produce profiling results, unfortunately.

The same problem.
I run profiling with code that reads history for 30,000 trades (5 years of trading) and no profiling result.
HistorySelect eats......
I already tried it in the array and then work with the array. The lags are less, but they are there.
 
Vladislav Andruschenko:
Same problem.
It's worth running profiling with code that reads the history for 30,000 trades (5 years of trading) and there's no result.

Yes, I have the history reading present.