![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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,
Hi personnaly used that, before resizing with the numbers of pairs selected by the trader :
double atd_AtrMarge[][][][];
and i get the same compiler message :
'[' - invalid index value
???
Only the first dimension can be dynamic []
Only the first dimension can be dynamic []
Of course, Thanks, we all this change, beeing paranoic before thouhgt.. Thanks.
D
hi, i try to define an array like this
int l=4;
double wInput[l];
but i got the same error " [" invalid index value
but when i write this
double wInput[4];
there is no error!
i think we are not allowed to use variables for index in decluration stage, if that is the problem, can anybody give me any solution? thanks.
You can only use numbers or predefined constants
it does not work. thanks any way.
Yes, it does. What is your error message?
Yes, it does. What is your error message?
i wrote this
and i got these errors
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
'wInput' undeclared identifier
wInput parameter conversion not allowed
i wrote this
and i got these errors
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
'wInput' undeclared identifier
wInput parameter conversion not allowed
There must be more lines in your code causing the problem. This compiles without error:
There must be more lines in your code. This compiles without error:
i wrote it in my own function ( Subroutine) and call it from OnInit()
i wrote it directly in OnInitand these errors disappear
";" unexpected token
'[' unbalanced left paranthesis
']'semicolon expected
but still i got
'wInput' undeclared identifier
'wInput' parameter conversion not allowed
i don't know why these errors appear! i wrote by several languages like java, c , basic ,matlab but none of them were like this !
Unfortunately, unless you post up your code I can't help you.
As you can see from my example above (and the examples in the documentation) it works.
Good luck!