RicardoSantos

ArrayStatistics

RicardoSantos Wizard Telah dikemas kini   
Library "ArrayStatistics"
Statistic Functions using arrays.

rms(sample) Root Mean Squared
Parameters:
  • sample: float array, data sample points.
Returns: float

skewness_pearson1(sample) Pearson's 1st Coefficient of Skewness.
Parameters:
  • sample: float array, data sample.
Returns: float

skewness_pearson2(sample) Pearson's 2nd Coefficient of Skewness.
Parameters:
  • sample: float array, data sample.
Returns: float

pearsonr(sample_a, sample_b) Pearson correlation coefficient measures the linear relationship between two datasets.
Parameters:
  • sample_a: float array, sample with data.
  • sample_b: float array, sample with data.
Returns: float p

kurtosis(sample) Kurtosis of distribution.
Parameters:
  • sample: float array, data sample.
Returns: float

range_int(sample, percent) Get range around median containing specified percentage of values.
Parameters:
  • sample: int array, Histogram array.
  • percent: float, Values percentage around median.
Returns: tuple with , Returns the range which containes specifies percentage of values.
Nota Keluaran:
added new function:
average_weighted(sample, weights) Computes a weighted average (the mean, where each value is weighted by its relative importance).
  Parameters:
    sample: float array, data sample.
    weights: float array, weights to apply to samples.
  Returns: float
Nota Keluaran:
v3
Updated: display examples on chart.
Added:
arithmetic_geometric_mean_simple(value_a, value_b, tolerance_value) Calculate the arithmetic-geometric mean of two numbers (_value_a, _value_b).
  Parameters:
    value_a: float, number value.
    value_b: float, number value.
    tolerance_value: float, number value, default=1e-12.
  Returns: float

arithmetic_geometric_mean(sample, tolerance_value) Computes the arithmetic geometric mean of a sequence of values.
  Parameters:
    sample: float array, data sample.
    tolerance_value: float, number value, default=1e-12.
  Returns: float
Nota Keluaran:
v4

Added:
zscore_simple(value, mean, deviation) Computes the simple version of the z-score formula.
  Parameters:
    value: float, data value.
    mean: float, data mean.
    deviation: float, the standard deviation of the data.
  Returns: float.

zscore(sample) Computes the z-score of a data sample values.
  Parameters:
    sample: float array, data values.
  Returns: float array.
Nota Keluaran:
v5

Updated:
arithmetic_geometric_mean() was not computed correctly, thank you, InvestCHK for pointing it out.
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.