Questions from a "dummy" - page 143

 
Karlson:
Here...
SPY!
 

The ENUM_MQL5_INFO_INTEGER enum contains identifiers indicating that the program is running in a particular mode.

ENUM_MQL5_INFO_INTEGER

Identifier .

Description

Property type

MQL5_PROGRAM_TYPE

Type of mql5-program

ENUM_PROGRAM_TYPE

MQL5_DLLS_ALLOWED

Permission to use the DLL for the current program running

bool

MQL5_TRADE_ALLOWED

Permission to trade for this running program

bool

MQL5_DEBUGGING

Sign of a running program working in debug mode

bool

MQL5_TESTING

Sign of running a programin the tester

bool

MQL5_OPTIMIZATION

Sign of running a program during optimization

bool

MQL5_VISUAL_MODE

Sign of running a programin a visual testing mode

bool

But it is not clear, which identifier should be used as a sign of running the program in the real trading mode. Can we consider that the MQL5_TRADE_ALLOWED identifier is a sufficient "attribute of running the program in the real trade mode"? Or there are no signs of running the program in the demo-mode and the real mode?

 
Yedelkin:

But it is not clear which identifier should be used as an indication of a running programme in real trading mode.

Is this meant on the real world?
 
TheXpert:
You mean on the real world?
Yes. Not in demo mode.
 
 

Semyon Semyonych! :/

Thank you!

 

Here we have"MQL5 Reference / Standard constants, enumerations and structures / Named constants / Constants of numeric types", for example: LONG_MAX, ULONG_MAX.

Are there any similar constants provided for thedatetime type? Is it something like datetime_max? Or for the datetime type, the maximum value must always be entered manually?

 
papaklass:
datatime_max ==TimeCurrent() if you don't intend to trade in the future.

No, you misunderstood the question. It's not the current dates I'm interested in, but the constants for datetime type. Restrictions, so to speak, above and below for a particular datatype.

papaklass:
datatime_max ==TimeCurrent()
This is an incorrect statement if "datatime_max" is understood to be the maximum value for thedatetime type, which is what the question was asked about.
 
Yedelkin:

No, you misunderstood the question. It's not the current dates I'm interested in, but the constants for datetime type. Restrictions, so to speak, above and below for a particular data type.

This is an incorrect statement if "datatime_max" is understood as the maximum value fordatetime type, which is what the question was asked about.

There is no constant, but you can organise it yourself via #define - https://www.mql5.com/ru/docs/basis/types/integer/datetime:

...December 31, 3000 year.

Документация по MQL5: Основы языка / Типы данных / Целые типы / Тип datetime
Документация по MQL5: Основы языка / Типы данных / Целые типы / Тип datetime
  • www.mql5.com
Основы языка / Типы данных / Целые типы / Тип datetime - Документация по MQL5
 
Rosh:

No constant, but you can organise yourself via #define - https://www.mql5.com/ru/docs/basis/types/integer/datetime

OK. The constant would like to be used in classes. I don't see how #define can be combined with classes yet. I guess I'll just have to introduce my own base class member variable.
Reason: