Struct arrays not allowed?
nondisclosure:
Well, If you put the following code into a script and load it up on a chart, you won't get the correct time value. Why?
I'm running similar code in another script and get array out range errors. I'm thinking they're related.
I assume your other code initializes the array first, or specifies the array size in declaration.
First you miss to ArrayResize(dOpen,..) as DeepThought said!
But I would use this way:
struct OrderInfo{ datetime dOpen; // ... }; OrderInfo ArrOrdInf[]; .. ArrayResize(ArrOrdInf,..); ...
Gooly
Thanks everyone. The stroke had me posting the question before implementing the correct way.
Well, If you put the following code into a script and load it up on a chart, you won't get the correct time value. Why?
I'm running similar code in another script and get array out range errors. I'm thinking they're related.