Did you noticed you have Instruments declared twice? The second declaration is invalid, and moreover its live cycle is only within the current block.
- Ovo: Did you noticed you have Instruments declared twice? The second declaration is invalid, and moreover its live cycle is only within the current block.
If you had used #property strict, the compiler would have warned you about that. - To create an array of objects the object must have a default constructor. See Structures and Classes - MQL4 Documentation. This you have since you didn't declare any constructors.
- You must do any other initialization in a method.

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
Hi,
I'm trying to create objects by looping through an array...... here's the code, but when I try to compile, I get the error " '[' - invalid index error "
Can somebody confirm if it can be done, and what I'm doing wrong
Thanks in advance.