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

 
 

I don't know whose method is better. I will not argue.

The only question that arises is whether it is dangerous to use the chart ID to form a magik?

 
Marat Sultanov:

The only question that arises is whether it is dangerous to use a chart ID to form a magik?

Dangerous, of course. That's what the branch is about. What to use is a choice, what string to form.