Electrified

Time

Electrified Cập nhật   
Library "Time"
Utilities for measuring time.

bar() Gets the number of milliseconds per bar.
Phát hành các Ghi chú:
v2 Added shortcut for getting the date.

Added:
date(datetime) Gets the start of the day for the provided time value.
  Parameters:
    datetime: The time of day to acquire the date from.
  Returns: The number of milliseconds representing the date for the given value.
Phát hành các Ghi chú:
v3

Added:
timeOfDay(datetime) Gets milliseconds from the start of the day.
  Parameters:
    datetime: The date/time to acquire the time of day from.
  Returns: The number of milliseconds representing time of day.
Phát hành các Ghi chú:
v4 Adds spanToLen functions
Phát hành các Ghi chú:
v5

Added:
spanToLen(timespan, type, sessionMinutes)
  Returns the number (float) bars that represents the timespan provided.
  Parameters:
    timespan: The number of units to convert to bar count.
    type: The type of units to measure. ('Bar', 'Minute' or 'Day')
    sessionMinutes: Optional override for the number of minutes per session. (Default: Regular = 390, Extended = 1440)
  Returns: The number bars that represents the timespan provided.

spanToIntLen(timespan, type)
  Returns the number (int) bars that represents the timespan provided.
  Parameters:
    timespan: The number of units to convert to bar count.
    type: The type of units to measure. ('Bar', 'Minute' or 'Day')
  Returns: The number bars that represents the timespan provided.
Phát hành các Ghi chú:
v6 improve spanToLen to allow for more types
Phát hành các Ghi chú:
v7 cleanup bar() calculation
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.