RicardoSantos

FunctionElementsInArray

RicardoSantos Wizard Aktualisiert   
Library "FunctionElementsInArray"
Methods to count number of elements in arrays

count_float(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: float array, sample data to process.
    value: float value to check for equality.
  Returns: int.

count_int(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: int array, sample data to process.
    value: int value to check for equality.
  Returns: int.

count_string(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: string array, sample data to process.
    value: string value to check for equality.
  Returns: int.

count_bool(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: bool array, sample data to process.
    value: bool value to check for equality.
  Returns: int.

count_color(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: color array, sample data to process.
    value: color value to check for equality.
  Returns: int.

extract_indices_float(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: float array, sample data to process.
    value: float value to check for equality.
  Returns: int.

extract_indices_int(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: int array, sample data to process.
    value: int value to check for equality.
  Returns: int.

extract_indices_string(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: string array, sample data to process.
    value: string value to check for equality.
  Returns: int.

extract_indices_bool(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: bool array, sample data to process.
    value: bool value to check for equality.
  Returns: int.

extract_indices_color(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: color array, sample data to process.
    value: color value to check for equality.
  Returns: int.
Versionshinweise:
v2

removed type references from name, as previously was not possible to use same name functions with different signature.

Added:
count(sample, value) Counts the number of elements equal to provided value in array.
  Parameters:
    sample: color array, sample data to process.
    value: color value to check for equality.
  Returns: int.

extract_indices(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
  Parameters:
    sample: color array, sample data to process.
    value: color value to check for equality.
  Returns: int.

Removed:
count_float(sample, value) Counts the number of elements equal to provided value in array.

count_int(sample, value) Counts the number of elements equal to provided value in array.

count_string(sample, value) Counts the number of elements equal to provided value in array.

count_bool(sample, value) Counts the number of elements equal to provided value in array.

count_color(sample, value) Counts the number of elements equal to provided value in array.

extract_indices_float(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.

extract_indices_int(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.

extract_indices_string(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.

extract_indices_bool(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.

extract_indices_color(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
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.