TheBacktestGuy

ArrayExt

TheBacktestGuy Aktualisiert   
Library "ArrayExt"
Array extensions

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

get(a, idx) Get element from the array at index, or na if index not found
  Parameters:
    a: The array
    idx: The array index to get
  Returns: The array item if exists or na

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set

set(a, idx, val) Set array item at index, if array has no index at the specified index, the array is filled with na
  Parameters:
    a: The array
    idx: The array index to set
    val: The value to be set
Versionshinweise:
v2

Added:
multisort(base_array, second) Sort arrays together
  Parameters:
    base_array: The base array to sort
    second: array The second array elements swaped the same way as base array
  Returns: Array of old indexes

reorder(index_array, array) Reorder array based on indexes
  Parameters:
    index_array: The array of indexes of the new order
    array: The array to be reorder
Versionshinweise:
v3

Updated:
Reverse order support, small bugfixes
Pine Bibliothek

In echter TradingView-Manier hat der Autor diesen Pine-Code als Open-Source-Bibliothek veröffentlicht, so dass andere Pine-Programmierer aus unserer Community ihn weiterverwenden können. Ein Hoch auf den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Publikationen verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie diese Bibliothek nutzen?

Kopieren Sie die folgende Zeile und fügen Sie sie in Ihr Skript ein.