Libraries: UniMagicNumber

 

UniMagicNumber:

The library allows receiving a magic number bound to three elements: symbol name, timeframe and prefix index.

The library allows receiving a magic number bound to three elements:

  • Symbol (financial instrument) name;
  • Timeframe;
  • Prefix index;

All these three elements are to be encoded in 64 bits, of which:

  • Symbol name = 48 bits (the first 8 characters are taken from the name);
  • Timeframe = 5 bits;
  • Prefix index = 11 bits (may be a number from 0 to 2047, inclusive).

Author: Marat Sultanov