PINE LIBRARY

formattingUtilities

От AlgoTrader_Pro
Обновлено
Library "formattingUtilities"

toPercentageString(x, decimals)
  : Converts a decimal number into a string formatted as percentage.
  Parameters:
    x (float): (simple float): Float number to be converted
    decimals (int): (simple int): Number of decimals to apply
  Returns: : Returns a string with x as percentage.

toFactorString(x, decimals)
  : Converts a decimal number into a string formatted as Factor.
  Parameters:
    x (float): (simple float): Float number to be converted
    decimals (int): (simple int): Number of decimals to apply
  Returns: : Returns a string with x as a Factor.

toCurrencyString(x, decimals)
  : Converts a decimal number into a string formatted as currency.
  Parameters:
    x (float): (simple float): Float number to be converted
    decimals (int): (simple int): Number of decimals to apply
  Returns: : Returns a string with x as currency.

toNumberString(x, decimals)
  : Converts a decimal number into a string formatted as decimal.
  Parameters:
    x (float): (simple float): Float number to be converted
    decimals (int): (simple int): Number of decimals to apply
  Returns: : Returns a string with x as a decimal.

colorByAboveBelow(x, reference, above, below, equal)
  : Returns a different color if the reference is above, below or equal to x.
  Parameters:
    x (float): (simple float): The number that will be tested, above, below or equal.
    reference (float): (simple float): The reference for for determining if x is above, below or equal.
    above (color)
    below (color)
    equal (color)
  Returns: : The color returned if above, below or equal.
Информация о релизе
v2

Added:
colorMap()
  : Returns a map with different colors
  Returns: : Returns a map with multiple colors
Информация о релизе
v3
Информация о релизе
v4

Added:
formatsMap()
  : Creates a map with multiple formats for different uses.
  Returns: : Returns a formatsMap which is a map with multiple formats.
Информация о релизе
v5
Информация о релизе
v6
Информация о релизе
v7
Информация о релизе
v8
Информация о релизе
v9
Информация о релизе
v10
Информация о релизе
v11
formatting
AlgoTrader_Pro

Библиотека Pine

В истинном духе TradingView автор опубликовал этот код Pine как библиотеку с открытым исходным кодом, чтобы другие программисты Pine из нашего сообщества могли им воспользоваться. Вы можете использовать эту библиотеку в приватных или других публикациях с открытым исходным кодом, но повторное использование этого кода в публикации регулируется Правилами поведения.

Отказ от ответственности