altair_606:
my issue is well summarized in the title of the topic. I would like to be able to declare a table of variable size according the configuration before launching the EA.
[...]
Sounds like the following should work - i.e. leave the size uninitialised, and then initialise it during init() using the ArrayResize() function.
extern int window;
int tab[];
...
int init()
{
...
ArrayResize(tab, window);
...
}
Thank you a lot. It seems to work.

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 everyone,
my issue is well summarized in the title of the topic. I would like to be able to declare a table of variable size according the configuration before launching the EA.
Now I am using
#define WINDOW 20
...
int tab[WINDOW]
But I would like to be able to modify this size with an extern variable. Of course, if I try the following code it doesn't not compile because "window is not an integer variable" according the compiler...
extern int window;
...
int tab[window];
If someone can help, I would be very grateful.
Thanks a lot,
Altaïr