×

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

Changes

Jump to navigation Jump to search

Array Sort

5 bytes added, 21:31, 27 February 2017
no edit summary
For numerical arrays, the elements are sorted according to the values they contain. For string arrays, the elements are sorted according to the ASCII values of the string characters, with the first character of the string being the most significant. For sorting true/false array elements, the value of true is considered to be greater than the value of false.
==== Usage ====
<syntaxhighlight>Array_Sort(ArrayName,StartIndex,EndIndex,SortOrder)</syntaxhighlight>
Where: [[:'''ArrayName]] ''' - an expression specifying the name of an array
[[:'''StartIndex]] ''' - a numerical expression specifying the starting index for the range
[[:'''EndIndex]] ''' - a numerical expression specifying the ending index for the range
[[:'''SortOrder]] ''' - a true/false value specifying the sort order; true specifies ascending order, and false specifies descending order
==== Example ====
Sort the elements in the segment of Array1 that begins at the index of 4 and ends at the index of 6, in ascending order:

Navigation menu