MT5 and speed in action - page 47

 
Roman:

That's the question, in addition to mql5, there are the developer's MQ service names.

Документация по MQL5: Предопределенные переменные
Документация по MQL5: Предопределенные переменные
  • www.mql5.com
Для каждой выполняющейся mql5-программы поддерживается ряд предопределенных переменных, которые отражают состояние текущего ценового графика на момент запуска программы - эксперта, скрипта или пользовательского индикатора. Значение предопределенным переменным устанавливает клиентский терминал перед запуском mql5-программы на выполнение...
 
Artyom Trishkin:

These are the variables that the developer showed to the user.
There are probably also hidden _names, for internal MQ development
That's the question, is it possible to run into them using _?

 
Roman:

These are the variables that the developer showed to the user.
There are probably hidden _names, too, for MQ's internal development
That's the question, if you can run into them using _.

What's the question? Well, if you get caught, you'll get a compile-time error too. Then you may ask a more specific question. But otherwise - just a guessing game?

 
Artyom Trishkin:

What's the question? If you get into trouble, you will get into a compilation error. Then you can ask a specific question. But in this case, you are just guessing?

I think I've asked you a very direct question :)
I hadn't thought about the compilation error.
But the MQ developer is human too and may miss an error.

I would like to hear Renat's answer, guessing is a futile exercise.

 

The variables n, x and y cannot be used with the statistics library)

#include <Math\Stat\Math.mqh>
int x, n, y;
void OnStart()
{}

declaration of 'x' hides global variable Math.mqh 5428 88

 
Aleksey Nikolayev:

The variables n, x and y cannot be used with the statistics library)

The declaration of 'x' hides global variable Math.mqh 5428 88

Rename the variables to Math.mqh and you can.
Except that the first update will re-download the default library files.
This is an example of my question.
Only my question is about intersection of user _names and MQ developer's service _names.
In your case the .mqh file is used and you have access to it.
The error alerts you to the overlap of global variables.
And if you use them locally, the compiler skips them. Artem to you this line about errors.
Man, is it such a hard question, about intersection of user _names, with _names of MQ developer.

 
Please move the off-topic discussion to another thread.
 
fxsaber:
Please move the off-topic discussion to another thread.

You use macros with the underscore _B
And the question arose just from your examples.
Don't you want to know the developer's answer?

 
Renat Fatkhullin:
We'll look into it, give us the source code.

I've sent it to the PM.

 
Found the brakes.
#include <fxsaber\Benchmark\Benchmark.mqh> // https://www.mql5.com/ru/code/31279

void OnTick()
{
  _BV(Alert(""), 100);
  _BV(Print(""), 10);
}


On a fast machine.

2020.10.07 12:03:39.916 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 121 mсs.
2020.10.07 12:03:39.916 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 6: Print()] = 13 mсs.
2020.10.07 12:03:40.440 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 219 mсs.
2020.10.07 12:03:41.112 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 6: Print()] = 13 mсs.
2020.10.07 12:03:43.452 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 225 mсs.
2020.10.07 12:03:45.696 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 208 mсs.
2020.10.07 12:03:45.949 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 129 mсs.
2020.10.07 12:03:45.949 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 6: Print()] = 11 mсs.
2020.10.07 12:03:47.240 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 140 mсs.
2020.10.07 12:03:47.698 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 146 mсs.
2020.10.07 12:03:48.341 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 140 mсs.
2020.10.07 12:03:48.783 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 294 mсs.
2020.10.07 12:03:48.933 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 111 mсs.
2020.10.07 12:03:49.666 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 165 mсs.
2020.10.07 12:03:54.540 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 146 mсs.
2020.10.07 12:03:54.540 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 6: Print()] = 13 mсs.
2020.10.07 12:03:55.431 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 150 mсs.
2020.10.07 12:03:55.793 Test9 (AUDCAD,H1)       Alert: Time[Test9.mq5 5: Alert()] = 179 mсs.


Print and Alert are not asynchronous? Can't test yet how it will be on slow VPS.