Errors, bugs, questions - page 1033

 
Why does the CFD not work?
 
Zeleniy:
Why is the CFD not working?
look at how long the CFD works
 
Vladon:
Look at how long the SFD is open until...
So the last bar is for March 5 =)
 
Zeleniy:
So the last bar is for March 5th =)
а :-)
 

What's the point of disabling error output after 100 warnings? I've read the updates - but they only talk about disabling warnings, and at the same time disable the error output that comes after them:

 
Compilation error: function must have a body. Implementation outside the class declaration does not help
class A {
public:
template<typename T>
        int operator+=( T t ) { return ( 1 ); } //function must have a body
};

class B {
};

void OnStart()
{
        A a;
        B b;
        a += b; 
}
 
Vladon:

what can it be:

critical runtime error 1079902208 in OnTick function (unknown error)

testing 2 hour time frame

Checking for available tools is worthwhile.

Write to servciesidek with all the details. Thank you.
 

A static classmember is protected from another static member, which is generally not logical.

class A {
protected:
        static int s1;
        static int s2;
};

int A::s1 = 0x1;
int A::s2 = A::s1; //ошибка компиляции
Документация по MQL5: Основы языка / Объектно-ориентированное программирование / Статические члены класса
Документация по MQL5: Основы языка / Объектно-ориентированное программирование / Статические члены класса
  • www.mql5.com
Основы языка / Объектно-ориентированное программирование / Статические члены класса - Документация по MQL5
 
A100:

A static classmember is protected from another static member, which is generally not logical.

https://www.mql5.com/ru/docs/basis/variables/initialization

Global andstaticvariables can only be initialised with a constant of the appropriate type or a constant expression.

Документация по MQL5: Основы языка / Переменные / Инициализация переменных
Документация по MQL5: Основы языка / Переменные / Инициализация переменных
  • www.mql5.com
Основы языка / Переменные / Инициализация переменных - Документация по MQL5
 
A100:

A static classmember is protected from another static member, which is generally not logical.

As a matter of fact, it is logical, for what is written looks a bit nonsensical.