mql5 documentation errors, defaults or inconsistencies.

 

Page : https://www.mql5.com/en/docs/globals/globalvariabletime

Return Value

The function returns time of last accessing the specified global variable. Addressing a variable for its value, for example using the GlobalVariableGet() and GlobalVariableCheck() functions, also modifies the time of last access. In order to obtain error details, call the GetLastError() function.

This is inexact, GlobalVariableCheck() does NOT modify the last access time.

void OnTick()
  {
   if(GlobalVariableCheck(GVT_name))
      Print(__FUNCTION__,__LINE__," ",(string)GlobalVariableTime(GVT_name));
  }
2023.04.06 23:42:57.320   GVT (EURUSD,H1)   OnInit18 2023.04.06 23:42:57
2023.04.06 23:43:07.410    GVT (EURUSD,H1)    OnTick38 2023.04.06 23:42:57
2023.04.06 23:43:19.299    GVT (EURUSD,H1)    OnTick38 2023.04.06 23:42:57
2023.04.06 23:43:26.538    GVT (EURUSD,H1)    OnTick38 2023.04.06 23:42:57
...
Documentation on MQL5: Global Variables of the Terminal / GlobalVariableTime
Documentation on MQL5: Global Variables of the Terminal / GlobalVariableTime
  • www.mql5.com
GlobalVariableTime - Global Variables of the Terminal - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Page :https://www.mql5.com/en/docs/basis/operators/return


That's not exact, class objects and structure can be returned.

I can provide code if needed to prove it.

Documentation on MQL5: Language Basics / Operators / Return Operator
Documentation on MQL5: Language Basics / Operators / Return Operator
  • www.mql5.com
Return Operator - Operators - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Page : https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

Some identifiers are unknown by MetaEditor.

'ERR_FTP_CLOSED' - undeclared identifier   
'ERR_DATABASE_INTERRUPT' - undeclared identifier  
'ERR_DATABASE_NOTFOUND' - undeclared identifier 
'ERR_DATABASE_EMPTY' - undeclared identifier   
'ERR_DATABASE_NOLFS' - undeclared identifier 
'ERR_DATABASE_FORMAT' - undeclared identifier 

This identifier ERR_DATABASE_INTERNAL is in double, for error 5120 and 5602.

And finally this identifier ERR_RESOURCE_UNSUPPOTED_TYPE has a typo, it should be ERR_RESOURCE_UNSUPPORTED_TYPE.

FIXED.
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
Documentation on MQL5: Constants, Enumerations and Structures / Codes of Errors and Warnings / Runtime Errors
  • www.mql5.com
Runtime Errors - Codes of Errors and Warnings - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

mql documentation has many other minor errors i spotted too e.g. this is one example where ArraySize is being used two times, hope this would be updated too.


FIXED.
 

On this page : https://www.mql5.com/en/docs/matrix/matrix_machine_learning/matrix_derivative

Ask them to add this in the documentation as a warning

  //suppose a vector of values x where x is the pre-activation values of a layer
    vector x;
  //and suppose a vector y 
    vector y;
  //and y is the activation values of a layer with activation function f(x)
    x.Activation(y,AF_SIGMOID);
  //suppose a vector d where we want to get the derivative values of the activations of a layer
    vector d;
  //we call the derivative function on the original vector x for all activation functions 
    x.Derivative(d,AF_SIGMOID);//correct
  //instead of on vector y of the activations
    /*
    y.Derivative(d,AF_SIGMOID);//wrong
    */

A lot of people do not expect it and will waste a lot of time . (including the author of a recent article)

This is needed as the last place they would look for an issue is the Derivative function -not saying is wrong but should state what it expects to be called from-

It may lead to coders designing and deploying the wrong stucture for their networks , just like the author did.

I'll also go ahead and state that this is something that someone who cares should have done from the get go if they deployed a function in such a counter intuitive way.(meaning deciding that instead of the functions that expect to be called from y to be called from y and the functions that expect to be called from x to be called from x ,everything must be called from x and we wont even let anyone know . this is irresponsible) 

Documentation on MQL5: Matrix and Vector Methods / Machine learning / Derivative
Documentation on MQL5: Matrix and Vector Methods / Machine learning / Derivative
  • www.mql5.com
Derivative - Machine learning - Matrix and Vector Methods - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Alain Verleyen #:

Page : https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes

Some identifiers are unknown by MetaEditor.

'ERR_FTP_CLOSED' - undeclared identifier    

Deleted as not present in MQL5 but only in MQL4

 
Alain Verleyen #:

'ERR_DATABASE_INTERRUPT' - undeclared identifier  
'ERR_DATABASE_NOTFOUND' - undeclared identifier 
'ERR_DATABASE_EMPTY' - undeclared identifier   
'ERR_DATABASE_NOLFS' - undeclared identifier 
'ERR_DATABASE_FORMAT' - undeclared identifier 


Added for highlighting in MetaEditor

 
Alain Verleyen #:

Page : https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes


This identifier ERR_DATABASE_INTERNAL is in double, for error 5120 and 5602.

The second one renamed to ERR_DATABASE_LOGIC

 
Alain Verleyen #:

Page : https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes


And finally this identifier ERR_RESOURCE_UNSUPPOTED_TYPE has a typo, it should be ERR_RESOURCE_UNSUPPORTED_TYPE.

Fixed, thank you Alain!

 
Arpit T #:

mql documentation has many other minor errors i spotted too e.g. this is one example where ArraySize is being used two times, hope this would be updated too.


Fixed, thank you

 
Lorentzos Roussos #:

On this page : https://www.mql5.com/en/docs/matrix/matrix_machine_learning/matrix_derivative

Ask them to add this in the documentation as a warning

A lot of people do not expect it and will waste a lot of time . (including the author of a recent article)

This is needed as the last place they would look for an issue is the Derivative function -not saying is wrong but should state what it expects to be called from-

It may lead to coders designing and deploying the wrong stucture for their networks , just like the author did.

I'll also go ahead and state that this is something that someone who cares should have done from the get go if they deployed a function in such a counter intuitive way.(meaning deciding that instead of the functions that expect to be called from y to be called from y and the functions that expect to be called from x to be called from x ,everything must be called from x and we wont even let anyone know . this is irresponsible) 

Will be improved as soon as possible. For a while you can use this include file as a reference.

Reason: