MT5 CustomRatesUpdate and CustomRatesReplace bug

 
Hello, I believe that in the 2 functions CustomRatesUpdate and CustomRatesReplace, there is a bug on the return value. Even if no bars are added or changed, they always return the value of the number of items passed to them.
So if you pass an array with 10 elements, they return 10 elements.
Instead they should return the actual number of changes made to the time series.
 
The documentation says You passed 10, it replaced 10, it returns 10.
Giovanni Riccobene: Instead they should return the actual number of changes made to the time series.
It does not say that it checks if anything has changed; that would be computationally expensive. So no, it should not "return the actual number of changes."
 
William Roeder #:
The documentation says You passed 10, it replaced 10, it returns 10. It does not say that it checks if anything has changed; that would be computationally expensive. So no, it should not "return the actual number of changes."

Yes but the return value say:

Return Value

Number of updated bars or -1 in case of an error.

Consequently I expect it to return me the actual number of changes, and not the number of values I passed to it, otherwise the function might just return me a boolean, so why return me a value and not a simple true or false?

Clearly for me it is not a problem, it will mean that I will perform a preventive check to verify if there are any real changes to be made to the time series. But honestly I would have preferred the integrated function to do this for me!
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