'ObjectSetDouble' - no one of the overloads can be applied to the function call
'ObjectSetInteger' - no one of the overloads can be applied to the function call
I think I've got it. In MT5 you must clearly specify all three ENUM_OBJECT_PROPERTY_STRING, ENUM_OBJECT_PROPERTY_INTEGER and ENUM_OBJECT_PROPERTY_DOUBLE. In MT4, simply specify int, and everything will work.
In this case I do not even know if MQL5 is a better solution than MQL4.
I think I've figured it out. In MT5 all three ENUM_OBJECT_PROPERTY_STRING, ENUM_OBJECT_PROPERTY_INTEGER and ENUM_OBJECT_PROPERTY_DOUBLE must be clearly specified. In MT4, simply specify int, and everything will work.
boolObjectSetInteger(
long chart_id, // идентификатор графика string name, // имя int prop_id, // свойство long prop_value // значение
);
It should be.
boolObjectSetInteger(
long chart_id, // идентификатор графика string name, // имя ENUM_OBJECT_PROPERTY_INTEGER prop_id, // свойство long prop_value // значение
);
What about in five with IndicatorBuffers when the number of CURRENT buffers cannot be set rigidly via #property? In fours there is no restriction with this.
Why does this class compile under MT4 but not under MT5?
If you remove operator definition in this class, it starts compiling under MT5. This seems to be a bug in compiler of 5.
Try substituting
__MQL5__
to
__MQL5BUILD__.
Try substituting
__MQL5__
to
__MQL5BUILD__
To not be confused by conditional compilation, I removed it.
Five can't compile, four is OK.
To avoid confusion with conditional compilation, I removed it
Five can't compile, four is OK.
What's the error log?
I think I've got it. In MT5 you must clearly specify all three ENUM_OBJECT_PROPERTY_STRING, ENUM_OBJECT_PROPERTY_INTEGER and ENUM_OBJECT_PROPERTY_DOUBLE. In MT4, simply specify int, and everything will work.
In this case I do not even know if MQL5 is a better solution than MQL4.
You passed an invalid parameterENUM_OBJECT_PROPERTY_STRING id as an input parameter to method ObjectSetDouble and ObjectSetInteger.
In general, do not make a common library for two languages, there would be more confusion.
I think I've figured it out. In MT5 all three ENUM_OBJECT_PROPERTY_STRING, ENUM_OBJECT_PROPERTY_INTEGER and ENUM_OBJECT_PROPERTY_DOUBLE must be clearly specified. In MT4, simply specify int, and everything will work.
Exactly!
Now it compiles on both platforms. There is clearly an error in Help 5.
Exactly!
It now compiles on both platforms. There's clearly an error in the five's help.
What is the error?
For example, in the ObjectSetInteger description now
It should be.
What about in five with IndicatorBuffers when the number of CURRENT buffers cannot be set rigidly via #property? In fours there is no restriction with this.