Posted By: Smon
extern static array of structs - 01/21/18 06:15
I wrote an indicator which holds data in a static struct array.
It's very complex code so I packed it into a function in an external source file for convenience reasons.
The function returns an index. Now I want to make the array a global variable so that I can just call
from within the trading script.
However, declaring
or even
results in a syntax error.
Is it even possible what I'm trying to do here?
It's very complex code so I packed it into a function in an external source file for convenience reasons.
The function returns an index. Now I want to make the array a global variable so that I can just call
Code:
MyArray[Indexfunction(some params)]
from within the trading script.
However, declaring
Code:
extern static STRUCT MyArray[100];
or even
Code:
static extern STRUCT MyArray[100];
results in a syntax error.
Is it even possible what I'm trying to do here?