Hi,
I think this is usefull when you retrieve an array from something like a "black-box" function or object class(you are not the programmer of that piece of code)
and you want to know if it's timeseries (current element is [0]) or not (current element is [ArraySize(theArray)-1] ),
or at least this is how I would use it for an array produce by another "module".
Hi,
I think this is usefull when you retrieve an array from something like a "black-box" function or object class(you are not the programmer of that piece of code)
and you want to know if it's timeseries (current element is [0]) or not (current element is [ArraySize(theArray)-1] ),
or at least this is how I would use it for an array produce by another "module".
You don't need this function to know if current element is [0], for that you need ArrayGetAsSeries(), a timeseries array can be indexed in both way independently of the fact it's a timeseries. Not only do you not need it but if you use it for that you will have a subtle bug in your code.
Anyway thanks for your reply.
ArrayIsSeries() shows you what the array did you receive via function call.
OnCalculate function gets timeseries arrays - time[], open[], high[], low[] etc. You can pass one of these arrays to some function.
If array is series, then you can see it's origin (client terminal history center) and you cannot change it
- www.mql5.com
ArrayIsSeries() shows you what the array did you receive via function call.
OnCalculate function gets timeseries arrays - time[], open[], high[], low[] etc. You can pass one of these arrays to some function.
If array is series, then you can see it's origin (client terminal history center) and you cannot change it
Angevoyeageur,
My first answer was not the best, but not wrong and not related to any bug because I know what to expect from my modules.
Yes, I've checked in the documentation and you're right about the indexing.
Thanks.
- www.mql5.com
Angevoyeageur,
My first answer was not the best, but not wrong and not related to any bug because I know what to expect from my modules.
Yes, I've checked in the documentation and you're right about the indexing.
Thanks.
Yes,
I have already agreed :)
Angevoyeageur,
My first answer was not the best, but not wrong and not related to any bug because I know what to expect from my modules.
Yes, I've checked in the documentation and you're right about the indexing.
Thanks.
I was replying to that above, your first answer was wrong and can lead to a bug.
Wow, you want to give me a lesson :D
Accepted.
Wow, you want to give me a lesson :D
Accepted.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I wonder why this function exist and how it can be used for an useful task ?
There is often confusion among programmers between this function and ArrayGetAsSeries, even in some good articles. Maybe there is historical reason or I miss something.