RicardoSantos

BinaryDecimalConversion

RicardoSantos Wizard アップデート済   
Library "BinaryDecimalConversion"
Converts decimal to and from binary.

to_binary(number) convert integer to binary string
Parameters:
  • number: int, value to convert.
Returns: string

to_decimal(binary) Converts a binary in a string to decimal.
Parameters:
  • binary: string, binary number in a string.
Returns: int
リリースノート:
v2 Binary shift methods, they are a bit demanding tho :s .

Added:
leftshift_logical(x, n)
  Shift the bits of an integer to the left.
  Parameters:
    x: int . Value to shift.
    n: int . Number of zeros to append to x.
  Returns: int.
リリースノート:
v3 missed some exports..

Added:
rightshift_logical(x, n)
  Shift the bits of an integer to the right.
  Parameters:
    x: int . Value to shift.
    n: int . Number of bits to remove at the right of x.
  Returns: int.

leftshift_arithmetic(x, n)
  Shift the bits of an integer to the left.
  Parameters:
    x: int . Value to shift.
    n: int . Number of zeros to append to x.
  Returns: int.
leftshift_arithmetic () {
reference:
stackoverflow.com/qu...nary-shift-in-python

rightshift_arithmetic(x, n)
  Shift the bits of an integer to the right.
  Parameters:
    x: int . Value to shift.
    n: int . Number of bits to remove at the right of x.
  Returns: int.
リリースノート:
v4 correcting a greasy finger :P, /lastonehesaid..

Updated:
leftshift_arithmetic(x, n)
  Shift the bits of an integer to the left.
  Parameters:
    x: int . Value to shift.
    n: int . Number of zeros to append to x.
  Returns: int.
Pineライブラリ

TradingViewの精神に則り、作者はPineコードをオープンソースライブラリとして公開し、コミュニティの他のPineプログラマーが再利用できるようにしました。作者に敬意を表します!このライブラリを個人的に、または他のオープンソースの投稿で使用することができますが、、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

このライブラリを使用したいですか?

以下の行をコピーして、スクリプト内に貼り付けてください。