Electrified

Averages

Electrified تم تحديثه   
Library "Averages"
Contains utilities for generating averages from arrays. Useful for manipulated or cleaned data.

triangular(src, startingWeight) Calculates the triangular weighted average of a set of values where the last value has the highest weight.
  Parameters:
    src: The array to derive the average from.
    startingWeight: The weight to begin with when calculating the average. Higher numbers will decrease the bias.

weighted(src, weights, weightDefault) Calculates the weighted average of a set of values.
  Parameters:
    src: The array to derive the average from.
    weights: The array containing the weights for the source.
    weightDefault: The default value to use when a weight is NA.

triangularWeighted(src, weights, startingWeight) Calculates the weighted average of a set of values where the last value has the highest triangular multiple.
  Parameters:
    src: The array to derive the average from.
    weights: The array containing the weights for the source.
    startingWeight: The multiple to begin with when calculating the average. Higher numbers will decrease the bias.

exponential(src) Calculates the exponential average of a set of values where the last value has the highest weight.
  Parameters:
    src: The array to derive the average from.

arrayFrom(src, len, omitNA) Creates an array from the provided series (oldest to newest).
  Parameters:
    src: The array to derive from.
    len: The target length of the array.
    omitNA: If true, NA values will not be added to the array and the resultant array may be shorter than the target length.
ملاحظات الأخبار:
v2 Fixed doc param name
ملاحظات الأخبار:
v3 Improved array from series function.
ملاحظات الأخبار:
v4 fixed exponential calc.
ملاحظات الأخبار:
v5 Fixed issue with exponential not tracking like ema.
ملاحظات الأخبار:
v6
مكتبة باين

كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشور تحكمه قواعد الموقع.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذه المكتبة؟

انسخ النص إلى الحافظة وألصقه في النص البرمجي الخاص بك.