
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
CopyBuffer() (and CopyIndicatorBuffer) documentation :
Note
When requesting data from the indicator, if requested timeseries are not yet built or they need to be downloaded from the server, the function will immediately return -1, but the process of downloading/building will be initiated.
When requesting data from an Expert Advisor or script, downloading from the server will be initiated, if the terminal does not have these data locally, or building of a required timeseries will start, if data can be built from the local history but they are not ready yet. The function will return the amount of data that will be ready by the moment of timeout expiration.
This note should be removed, as CopyBuffer() is not related to timeseries.
Additionally a note should be added about indicators buffers updates when an indicator is running using iCustom.
Forum on trading, automated trading systems and testing trading strategies
ENUM_COPY_TICKS values different from reference
Fernando Carreiro, 2023.06.13 19:36
That may be the case, but the documentation is still incorrect ... Documentation on MQL5: Matrix and Vector Methods / Initialization / CopyTicks
Below is a copy of the online version and the values are incorrect as demonstrated in my code above.
Forum on trading, automated trading systems and testing trading strategies
ENUM_COPY_TICKS values different from reference
Fernando Carreiro, 2023.06.13 18:44
As a supplement to your information, I get the following ...
Forum on trading, automated trading systems and testing trading strategies
ENUM_COPY_TICKS values different from reference
Tobias Johannes Zimmer, 2023.06.13 21:07
Oh yes, that is another thing i noticed. Each time I press F1 while cursor is on the normal CopyTicksRange function, I get the reference article for the vector/matrix function.Missing error code translations. - Incomplete list of error codes.
French, Japanese:
Error codes: 4023 - 4025, 5700 - 5706, 5800 - 5808
https://www.mql5.com/fr/docs/constants/errorswarnings/errorcodes
https://www.mql5.com/ja/docs/constants/errorswarnings/errorcodes
Wrong specification of function parameters:
SocketTlsCertificate()- Get data on the certificate used to secure network connection.
The parameters 2-6 are specified as [in] parameters, but actually they are [out] parameters, as can be seen by the example, and the fact, they are specified as reference parameter types.https://www.mql5.com/en/docs/network/sockettlscertificate
Wondering where these functions went, or if they ever existed....
https://www.mql5.com/en/docs/basis/variables#array_built_in_methods
Compile result:
Missing type specifier beyond "unsigned" in documentation:
https://www.mql5.com/en/docs/basis/types/matrix_vector
vector matrix.Row(const unsigned nrow)
Return a row vector
vector matrix.Col(const unsigned ncol)
Return a column vector
unsigned matrix.Rows()
Return the number of rows in a matrix
unsigned matrix.Cols()
Return the number of columns in a matrix
My guess is this should be a long type. - "unsigned long" or "ulong" as both are valid in MQL5
EDIT:
I suggest also mentioning what a scalar type is, as these would refere to (probably) float, double and signed as well as unsigned versions of char, short, int, long. - But also color and datetime could be used, as they are just a different interpretation of uint(color) and long(datetime).
- Have I forgotton anything?
Documentation on vectors and matrices seems not complete at all, and has quite some errors:
https://www.mql5.com/en/docs/basis/types/matrix_vector
Compile result:
I wont point out all the other errors, as this needs complete revision anyways. -
MetaQuotes, please update the Documentation, maybe add a new section representing vector, complex and matrix objects. - I am a little annoyed, because you dont update the docs to accomodate the pointed out errors in this thread. - Ive contributed quite some work to make it easy for you, still you refuse to do the required updates, and you dont allow us moderators to edit the docs either.
Also it would be nice, if you yould enable us to derive from vector, complex and matrix types. - Example:
Also, still making it possible to pass these derived objects into API-Functions that tyke in the base types.
Asking myself, if this is intentional, or maybe a bug.
According to documentation, it is possible to use initializer lists on structs and classes, as long as they do not have an explicit constructor.
https://www.mql5.com/en/docs/basis/types/classes#class
But this wont work, though, docs do not state dynamic arrays are a show stopper on initialization lists.
Result:
For confirmation, this seems to be a bug, see following example:
Why? - Because per definition, and as figured here:
https://www.mql5.com/en/forum/445076/page2#comment_46566076
An array initialized with an initializer list is static and not dynamic. - This would conclude, the array in _test_dynamic should be implicit declared as a static array. (Or better, resized to the initializer list size, and have the property dynamic)
EDIT:
Changed first code listing, added brackets to the initialization list, as required for addressing the array inside the struct. (Result is the same)