TheBacktestGuy

ArrayExt

TheBacktestGuy Telah dikemas kini   
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
Nota Keluaran:
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
Nota Keluaran:
v3

Updated:
Reverse order support, small bugfixes
Perpustakaan Pine

Di dalam semangat sebenar TradingView, pengarang telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka, jadi pengaturcara-pengaturcara Pine yang lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau pada penerbitan-penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini di dalam penerbitan adalah ditadbir oleh Peraturan Dalaman.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Mahu gunakan perpustakaan ini?

Salin garisan ini dan tampalkan ia di dalam skrip anda.