Array Question

Questions about MultiCharts and user contributed studies.
Thomas Mann
Posts: 173
Joined: 25 Aug 2007

Array Question

Postby Thomas Mann » 28 Jan 2008

I am trying to figure out how to set a array size dynamically at the start of a script from a Input value. I have tried the code listed below but get a compile error. Any ideas ?

Input ArraySize(64);

ARRAY: ArrayHolder[ArraySize](0);

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 29 Jan 2008

Hi Thomas Mann,

Try the code below:

Input: ArraySize(64);
ARRAY: ArrayHolder[](0);

Array_SetMaxIndex(ArrayHolder, ArraySize);

Thomas Mann
Posts: 173
Joined: 25 Aug 2007

Postby Thomas Mann » 29 Jan 2008

Thanks Mariana

Return to “MultiCharts”