
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
This is most likely because ArrayInitialize() is intended to fill only arrays of a certain type, numeric arrays to be exact (most likely int or double).
Because the array has type ENUM_ORDER_TYPE call of ArrayInitialize will cause an error, saying that this method of call is not allowed.
In my opinion, there are two options in this case:
1. change the ENUM_ORDER_TYPE array type to int, and take it into account in the code (at least order types can easily be represented as int);
2. Independently implement "initialization" of the array.
Everything is OK with the int type, I would like this type to be initialized
Or write your own ArrayInitialize analog (as procedure or function, your choice), or ask developers to change ArrayInitialize logic (which they will unlikely agree to).
For example, you can organize a module that contains, say, ArrayInitializeOrderType() bool and similar functions, and then use them when necessary.
Or write your own ArrayInitialize analog (as procedure or function, your choice), or ask developers to change ArrayInitialize logic (which they will unlikely agree to).
For example, you can create a module which contains, say, ArrayInitializeOrderType() bool and similar functions, and then use them when necessary.
I understand all that, but I don't want to do it with crutches
I don't see it as "crutches", I'd rather see it as an extension of MQL5 functionality and creation of my own library.
I'm sure it's more convenient, reliable and ultimately faster.
I don't consider it a "crutch", I'd rather see it as an extension of MQL5 functionality and creation of its own library.
I'm convinced it's more convenient, reliable and ultimately faster.
Is there an error in fresh build 362 (02.12.2010)? Unexpectedly CopyTime function, 3rd variant, stopped working. The script gives out
2000
2000
-1
History is loaded, it is present on the chart. Everything worked in the previous build.
This situation is as follows, we need to transfer datatime from indicator to Expert Advisor. I have found it via Globalvariable, but the issue is about possible loss of data due to type conversion.
This situation is as follows, we need to transfer datatime from indicator to Expert Advisor. I have found it via Globalvariable, but the issue is about possible loss of data due to type conversion.
Just write an explicit type conversion.
What are these errors?
7 leaked strings left
Abnormal termination