Download MetaTrader 5
  • Compare

Compare

Compares the current object with the specified value.

int Compare(
    value     // the value to compare
   );

Parameters

value

[in]  The value to compare the current object with.

Return Value

Returns a number that expresses the ratio of the current and passed object:

  • if the result is less than zero, the current object is less than the passed one
  • if the result is zero, the current object is equal to than the passed one
  • if the result is greater than zero, the current object is greater than the passed one