PINE LIBRARY
已更新 TPCTime_Public

Library "TPCTime_Public"
Helpers for calculating time
getTimeOffset(interval, amount) Returns the length in ms for the given amount of the given interval.
Parameters:
interval: Interval to calculate, for example "D" or "60".
amount: Number of intervals for which to calculate the time range in ms.
Returns: The number of ms in the amount of the given interval.
isInTimeRange()
Helpers for calculating time
getTimeOffset(interval, amount) Returns the length in ms for the given amount of the given interval.
Parameters:
interval: Interval to calculate, for example "D" or "60".
amount: Number of intervals for which to calculate the time range in ms.
Returns: The number of ms in the amount of the given interval.
isInTimeRange()
發行說明
v2Added:
getPeriodAsMs()
isChildPeriod()
Updated:
getTimeOffset()
isInTimeRange()
發行說明
v3發行說明
v4Added:
getHumanDayOfWeek(timestamp, isShort, isWrap, startWrap, endWrap)
Returns the human-readable day of week for the given time.
Parameters:
timestamp: The UNIX timestamp for which to return the day of the week.
isShort: Whether to return a short date, e.g. "Mo" instead of "Monday"
isWrap: Whether to wrap the date, e.g. placing it inside characters such as brackets to result in [Mo]
startWrap: Start wrap character, e.g. an opening bracket.
endWrap: End wrap character, e.g. a closing bracket.
Returns: The number of ms in the given period.
發行說明
v5Added:
isInTimeRangeFromCurrentTime(period, periodCount)
Returns true if the current time is greater than or equal to the given periodCount of periods, else returns false.
Parameters:
period (string): Period to calculate with, for example "D" or "60".
periodCount (int): Amount of given periods to test.
Returns: True if the current time is greater than or equal to the given periodCount of periods, else returns false.
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。