×

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

1 byte added, 11:10, 4 March 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: 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:
<syntaxhighlight>Value1=Array_Compare(Array1,4,Array2,6,2);</syntaxhighlight>
Assign a value, indicating the result of comparing two-element segments that begin at the index of 4 and at the index of 6 within the same array, to Value1 variable:

Navigation menu