Electrified

Time

Electrified Zaktualizowano   
Library "Time"
Utilities for measuring time.

bar() Gets the number of milliseconds per bar.
Informacje o Wersji:
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.
Informacje o Wersji:
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.
Informacje o Wersji:
v4 Adds spanToLen functions
Informacje o Wersji:
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.
Informacje o Wersji:
v6 improve spanToLen to allow for more types
Informacje o Wersji:
v7 cleanup bar() calculation
Biblioteka Pine

Działając zgodnie z prawdziwym duchem TradingView, autor opublikował ten kod Pine jako bibliotekę o otwartym kodzie źródłowym, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla niego! Możesz korzystać z tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne wykorzystanie tego kodu w publikacji podlega Regulaminowi.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz skorzystać z tej biblioteki?

Skopiuj poniższy wiersz i wklej go w swoim skrypcie.