×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

StringArray

1,713 bytes added, 14:53, 19 January 2012
Created page with "Used in function input declaration statements to define an input as a String Array with a specified number of dimensions. Input defined as String can be used both as a String..."
Used in function input declaration statements to define an input as a String Array with a specified number of dimensions.
Input defined as String can be used both as a String Simple as well as a String Series input; the value of a Simple input is constant from bar to bar and thus has no history, while the value of a Series input may vary from bar to bar and can be referenced historically.

==== Usage ====
<syntaxhighlight>Input:InputName[M1,M2,M3,etc.](StringArray)</syntaxhighlight>

==== Parameters ====
[[InputName]] - an expression specifying the input name

The name can consist of letters, underscore characters, numbers, and periods.

The name cannot begin with a number or a period and is not case-sensitive.

M - an input variable that represents the maximum index value for each dimension of the array passed to the function; a single input variable specifies a one-dimensional array input, two input variables specify a two-dimensional (M1 by M2) array input, three input variables specify a three-dimensional (M1 by M2 by M3) array input, etc.

An input will only accept an array with the specified number of dimensions.

==== Example ====
Declare Messages as a one-dimensional String Array function input:

<syntaxhighlight>Input:Messages[X](StringArray);</syntaxhighlight>

The maximum index value for the array passed to the function will be assigned to input variable X.


Declare MessageTable as a three-dimensional String Array function input:

<syntaxhighlight>Input:MessageTable[X,Y,Z](StringArray);</syntaxhighlight>

The maximum index value for each dimension of the array passed to the function will be assigned to input variables X, Y, and Z.


[[Category:Declaration]]
Anonymous user