Library "Toolbelt"

changePercentExp(float, int) Get change percent expression for given source
  Parameters:
    float: source Source used to generate the change percent value
    int: barIdx The bar index to use
  Returns: Change percent expression

allTimeHighExp(series) Get data from the bar that cointains all time high of the given source
  Parameters:
    series: float source Source of data for all time high
  Returns: A tuple of length 7, containing source, open, high, low, close, volume, and time
@Dependencies: open, high, low, close, volume, time

allTimeLowExp(series) Get data from the bar that cointains all time low of the given source
  Parameters:
    series: float source Source of data for all time low
  Returns: A tuple of length 7, containing source, open, high, low, close, volume, and time
@Dependencies: open, high, low, close, volume, time

splitStringData(string, int, string) Extract data from given string using string split.
  Parameters:
    string: str String to be split.
    int: idx The index of the value to be retreived after string splitting.
    string: sep Seperator to be used for splitting. (`,` is used, if no argument is provided)
  Returns: The index value from a split string. Empty string if not found.

compactValue(float, string) Turn a full size float value into a compact value
  Parameters:
    float: val The float value
    string: key Optional key
  Returns: Compact value in formatted string
@Dependencies: format.mintick

upGradientColor(float, float, color, color) Get an "up" color within a color gradient
  Parameters:
    float: val Positive number upto max value
    float: max Max number which will have the top gradient color
    color: maxColor Color for max value
    color: neutralColor Color for neutral value
  Returns: Color from the postive gradient scale

downGradientColor(float, float, color, color) Get a "down" color within a color gradient
  Parameters:
    float: val Negative number down to min value
    float: min Min number which will have the bottom gradient color
    color: minColor Color for min value
    color: neutralColor Color for neutral value
  Returns: Color from the negative gradient scale

gradientColor(float, float, float, color, color) Get a color within a color gradient
  Parameters:
    float: val Any number from min to max value
    float: min Min number which will have the bottom gradient color
    float: max Max number which will have the top gradient color
    color: minColor Color for min value
    color: maxColor Color for max value
  Returns: Color from the full gradient scale

Faiyaz Haider
Bibliothèque Pine

Dans le véritable esprit de TradingView, l'auteur a publié ce code Pine en tant que bibliothèque open-source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur ! Vous pouvez utiliser cette bibliothèque à titre privé ou dans d'autres publications open-source, mais la réutilisation de ce code dans une publication est régie par notre Règlement.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser cette bibliothèque?

Copiez le texte dans le presse-papiers et collez-le dans votre script.