Library "arrays"
Library contains utility functions using arrays.

delete( arr , index)
  remove an item from array at specific index. Also deletes the item
  Parameters:
    arr: - array from which the item needs to be deleted
    index: - index of item to be deleted
  Returns: void

pop( arr )
  remove the last item from array. Also deletes the item
  Parameters:
    arr: - array from which the last item needs to be removed and deleted
  Returns: void

shift( arr )
  remove an item from array at index 0. Also deletes the item
  Parameters:
    arr: - array from which the first item needs to be removed and deleted
  Returns: void

unshift( arr , val, maxItems)
  add an item to the beginning of an array with max items cap
  Parameters:
    arr: - array to which the item needs to be added at the beginning
    val: - value of item which needs to be added
    maxItems: - max items array can hold. After that, items are removed from the other end
  Returns: resulting array

clear( arr )
  remove and delete all items in an array
  Parameters:
    arr: - array which needs to be cleared
  Returns: void

push( arr , val, maxItems)
  add an item to the end of an array with max items cap
  Parameters:
    arr: - array to which the item needs to be added at the beginning
    val: - value of item which needs to be added
    maxItems: - max items array can hold. After that, items are removed from the starting index
  Returns: resulting array

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.