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.

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
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.