MetaTrader 5 MT5 Libraries Hash functions library – library MetaTrader 5

Hash functions library – library MetaTrader 5

General purpose hash functions:

  • adler32
  • CRC-32 (fast, table implementation)
  • MaHash8v64 (fast, table implementation)

All three functions are adapted for MQL5 Unicode strings. The results has been verified with Fsum Frontend

Radix Conversion:

  • from decimal (ulong) to Base radix
  • inverse transformation

The radix conversion is based on the following sequence of chars: 10 [0..9] + 26 [A..Z] + 26 [a..z] + 33 [А..Я] + 33 [а..я].  The “0-9” digits and “A-Z” english letters are used up to base 36.

The possible practical use of the other radix may be the compact form of string representation of a number in names of graphic objects. For example, 64-bit number generally has the following number of chars:

  • decimal: 20 chars (ULONG_MAX)
  • hexadecimal: 16 chars
  • base 36: 11 chars
  • base 128: 10 chars
Alternative:   Delta_WPR - indicator MetaTrader 5

the optimal is the base 36 radix.

📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks