f4r33x

Encoder Decoder

f4r33x Cập nhật   
Library "EncoderDecoder"


Simple example how to encode some values into float number and then decode it back to original values



f_calctype()
  Encode parameter
  Returns: encoded value

f_calctype()
  Decode parameter
  Returns: decoded value

f_srctype()
  Encode parameter
  Returns: encoded value

f_srctype()
  Decode parameter
  Returns: decoded value

f_encode(calc_type, src_type, tf, length)
  Encodes 4 paramters into float number
  Parameters:
    calc_type: 1st paramter to encode (its values defined in f_calctype functions) max number of values that can be encoded = 100
    src_type: 2nd paramter to encode (its values defined in f_src_type functions) max number of values that can be encoded = 100
    tf: 3rd paramter to encode (may be int number with format.price precision length!)
    length: 4th paramter to encode (may be any int number)
  Returns: float number

f_decode()
  Decodes 4 paramters into tuple
  Returns: tuple
Phát hành các Ghi chú:
v2

Added:
float value can contain longer value, that cannot end by '0 or 9'
f_count_intdigits()
  Count int digits in number
  Returns: number of int digits in number

f_count_floatdigits()
  Count float digits in number
  Returns: number of float digits in number
Phát hành các Ghi chú:
v3 fix bugs
Phát hành các Ghi chú:
v4
code cleaning
Thư viện Pine

Với tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này như một thư viện mã nguồn mở để các lập trình viên Pine khác từ cộng đồng của chúng tôi có thể sử dụng lại nó. Chúc mừng tác giả! Bạn có thể sử dụng thư viện này một cách riêng tư hoặc trong các ấn phẩm mã nguồn mở khác, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy chung.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng thư viện này?

Sao chép văn bản vào khay nhớ tạm và dán nó vào tập lệnh của bạn.