Hello, I created a custom indicator in MQL5 (version 5.00 build 3802) that uses the functions ArraySetAsSeries and ArrayIsSeries to handle array indexing as timeseries. After some tests I think that ArrayIsSeries is buggy. I took the official code from the MQL5 documentation for ArraySetAsSeries (https://www.mql5.com/en/docs/array/arraysetasseries) and modified it a bit to do some tests.
The result is not convincing, we can see that ArrayIsSeries works on system constants, but not on non-system arrays, in the outputs of the prints:
On the other hand, arraysGetAsseries works. I expected the function ArrayIsSeries to return true for the arrayTmp array which is clearly a timeseries, because it contains data ordered by time and it has the AS_SERIES flag set to true. Please let me know if this is a bug, thank you.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I created a custom indicator in MQL5 (version 5.00 build 3802) that uses the functions ArraySetAsSeries and ArrayIsSeries to handle array indexing as timeseries. After some tests I think that ArrayIsSeries is buggy. I took the official code from the MQL5 documentation for ArraySetAsSeries (https://www.mql5.com/en/docs/array/arraysetasseries) and modified it a bit to do some tests.
The result is not convincing, we can see that ArrayIsSeries works on system constants, but not on non-system arrays, in the outputs of the prints:
On the other hand, arraysGetAsseries works. I expected the function ArrayIsSeries to return true for the arrayTmp array which is clearly a timeseries, because it contains data ordered by time and it has the AS_SERIES flag set to true. Please let me know if this is a bug, thank you.