×

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 Compare

4 bytes added, 21:23, 27 February 2017
no edit summary
Returns a value of 0 if each respective pair of elements compared as equal; a value of 1 if, for the first pair that was not equal, the value in the source range was greater then the value in the destination range; and a value of -1 if, for the first pair that was not equal, the value in the source range was less then the value in the destination range.
==== Usage ====
<syntaxhighlight>Array_Compare(SourceArray,SourceIndex,DestinationArray,DestinationIndex,NumberOfElements)</syntaxhighlight>
Where: [[:'''SourceArray]] ''' - an expression specifying the name of the source array
[[:'''DestinationArray]] ''' - an expression specifying the name of the destination array
[[:'''SourceIndex]] ''' - a numerical expression specifying the starting index for the source array
[[:'''DestinationIndex]] ''' - a numerical expression specifying the starting index for the destination array
[[:'''NumberOfElements]] ''' - a numerical expression specifying the number of elements to compare
==== Return ====
0 - each respective pair of elements compared as equal
-1 - for the first pair compared that was not equal, the value in the source range was less then the value in the destination range
==== Example ====
Assign a value, indicating the result of comparing two-element segments, of Array1, beginning at the index of 4, and of Array2, beginning at the index of 6, to Value1 variable:

Navigation menu