×

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.

Array IndexOf - MultiCharts
Open main menu

Array IndexOf

Revision as of 13:36, 10 April 2017 by Angelina (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Will return index of a specific element in one-dimensional array. Will return -1 if the array will not contain the specific element.

Usage

Array_IndexOf(ArrayName,Value)

Where:

ArrayName - an expression specifying the name of an numerical/string/boolean array.
Value - a numerical/string/boolean expression specifying the value to search for.

Example

Assign an index of value 4 to Value1 variable in the numeric array Array1:

Value1 = Array_IndexOf(Array1,4);