TimeCurrent returns the time of the last tick of the main symbol, not the tester (server). It's not possible to find out the exact current time of the server in milliseconds.
Графические объекты Text, Label, Bitmap и Bitmap Label (OBJ_TEXT, OBJ_LABEL, OBJ_BITMAP и OBJ_BITMAP_LABEL) могут иметь один из 9 различных способов привязки своих координат, задаваемых свойством OBJPROP_ANCHOR. – объекты имеет ширину и высоту. Если указано "только для чтения", то это означает, что значения ширины и высоты вычисляются...
typing of the template parameters is strict, specialization with implicit conversion is unacceptable
it is possible to write functions that take as input parameters pointers only a base class, and their descendants are discarded at compile time.
Example
template <typename T>
void StrongCondition( T, T ) {}
class A
{
public:
int i;
template <typename T>
void SetStong( T Value )
{
StrongCondition(&this, Value);
this.i = Value.i;
}
void Set( A* Value )
{
this.i = Value.i;
}
};
class B : public A {};
voidOnStart()
{
A a;
B b;
a.Set(&b);
a.SetStong(&a);
a.SetStong(&b); // потомки в явном виде запрещены
a.SetStong((A*)(&b)); // только явное приведение разрешено
}
Can I change fieldsof the const-objectclass or call its non-const-methods? -You may!
template <typename T>
T GetMe( const T Ptr )
{
return((T)Ptr);
}
class A
{
public:
int i;
};
voidOnStart()
{
const A a;
GetMe(&a).i = 1;Print(a.i); // 1
}
I don't like this trick myself. I thought I was insured against unauthorized access. Bummer, though! Of course, it does not work with const-structures. So keep this loophole in mind.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
In the tester, it is only possible to find out the current time correctly throughTimeTradeServer(), not TimeCurrent().
This is a very controversial statement.
Result
TimeCurrent returns the time of the last tick of the main symbol, not the tester (server). It's not possible to find out the exact current time of the server in milliseconds.
Good afternoon. I read about the service arrays https://www.mql5.com/ru/docs/constants/objectconstants/enum_anchorpoint ( in the last example)
double Ups[],Downs[];
datetime Time[];
Is there a list of all service arrays somewhere?
en/signals/352123
A language technique that allows the use of protected methods/fields.
Example
typing of the template parameters is strict, specialization with implicit conversion is unacceptable
it is possible to write functions that take as input parameters pointers only a base class, and their descendants are discarded at compile time.
Example
I don't like this trick myself. I thought I was insured against unauthorized access. Bummer, though! Of course, it does not work with const-structures. So keep this loophole in mind.