PINE LIBRARY
تم تحديثه racille_arrayutils

Library "racille_arrayutils"
The most used array utility functions
func_sin()
returns sin function as a parameter to calculate the function_array()
func_cos()
returns cos function as a parameter to calculate the function_array()
func_tan()
returns tan function as a parameter to calculate the function_array()
func_cot()
returns cot function as a parameter to calculate the function_array()
func_asin()
returns asin function as a parameter to calculate the function_array()
func_acos()
returns acos function as a parameter to calculate the function_array()
func_atan()
returns atan function as a parameter to calculate the function_array()
func_acot()
returns acot function as a parameter to calculate the function_array()
func_sqrt()
returns sqrt function as a parameter to calculate the function_array()
func_pow(x)
returns pow function as a parameter to calculate the function_array()
Parameters:
x: - power
func_exp(x)
returns exp function as a parameter to calculate the function_array()
Parameters:
x: - base
func_log(x)
returns log function as a parameter to calculate the function_array()
Parameters:
x: - base
func_replace_array(arr, func)
replace each element of array with func(element) and returns a new array
Parameters:
arr: - array
func: - function to replace. Must be one of func_*()
Returns: new array, where each element is func(element)
multiply_array(arr, x)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
x: - multiplier
Returns: new array, where each element is multiplied on x
multiply_array(arr, n)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
n: - multiplier
Returns: new array, where each element is multiplied on n
multiply_array(arr, n)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
n: - multiplier
Returns: new array, where each element is multiplied on n
divide_array(arr, x)
divides each element of array by divider and returns a new array
Parameters:
arr: - array
x: - divider
Returns: new array, where each element is multiplied on x
divide_array(arr, n)
divides each element of array by divider and returns a new array
Parameters:
arr: - array
n: - divider
Returns: new array, where each element is multiplied on n
increase_array(arr, x)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
x: - increment
Returns: new array, where each element is multiplied on x
increase_array(arr, n)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
n: - increment
Returns: new array, where each element is multiplied on n
increase_array(arr, n)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
n: - increment
Returns: new array, where each element is multiplied on x
decrease_array(arr, x)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
x: - decrement
Returns: new array, where each element is multiplied on x
decrease_array(arr, n)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
n: - decrement
Returns: new array, where each element is multiplied on n
decrease_array(arr, n)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
n: - decrement
Returns: new array, where each element is multiplied on x
negate_array(arr)
changes each elements sign of array and returns a new array
Parameters:
arr: - array
Returns: new array, where each element is of different sign
array_sum()
calculates elementwise sum of two arrays
array_diff()
calculates elementwise difference of two arrays
array_product()
calculates elementwise product of two arrays
array_division()
calculates elementwise division of two arrays
The most used array utility functions
func_sin()
returns sin function as a parameter to calculate the function_array()
func_cos()
returns cos function as a parameter to calculate the function_array()
func_tan()
returns tan function as a parameter to calculate the function_array()
func_cot()
returns cot function as a parameter to calculate the function_array()
func_asin()
returns asin function as a parameter to calculate the function_array()
func_acos()
returns acos function as a parameter to calculate the function_array()
func_atan()
returns atan function as a parameter to calculate the function_array()
func_acot()
returns acot function as a parameter to calculate the function_array()
func_sqrt()
returns sqrt function as a parameter to calculate the function_array()
func_pow(x)
returns pow function as a parameter to calculate the function_array()
Parameters:
x: - power
func_exp(x)
returns exp function as a parameter to calculate the function_array()
Parameters:
x: - base
func_log(x)
returns log function as a parameter to calculate the function_array()
Parameters:
x: - base
func_replace_array(arr, func)
replace each element of array with func(element) and returns a new array
Parameters:
arr: - array
func: - function to replace. Must be one of func_*()
Returns: new array, where each element is func(element)
multiply_array(arr, x)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
x: - multiplier
Returns: new array, where each element is multiplied on x
multiply_array(arr, n)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
n: - multiplier
Returns: new array, where each element is multiplied on n
multiply_array(arr, n)
multiplies each element of array by multiplier and returns a new array
Parameters:
arr: - array
n: - multiplier
Returns: new array, where each element is multiplied on n
divide_array(arr, x)
divides each element of array by divider and returns a new array
Parameters:
arr: - array
x: - divider
Returns: new array, where each element is multiplied on x
divide_array(arr, n)
divides each element of array by divider and returns a new array
Parameters:
arr: - array
n: - divider
Returns: new array, where each element is multiplied on n
increase_array(arr, x)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
x: - increment
Returns: new array, where each element is multiplied on x
increase_array(arr, n)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
n: - increment
Returns: new array, where each element is multiplied on n
increase_array(arr, n)
adds increment to each element of array and returns a new array
Parameters:
arr: - array
n: - increment
Returns: new array, where each element is multiplied on x
decrease_array(arr, x)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
x: - decrement
Returns: new array, where each element is multiplied on x
decrease_array(arr, n)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
n: - decrement
Returns: new array, where each element is multiplied on n
decrease_array(arr, n)
substracts decrement to each element of array and returns a new array
Parameters:
arr: - array
n: - decrement
Returns: new array, where each element is multiplied on x
negate_array(arr)
changes each elements sign of array and returns a new array
Parameters:
arr: - array
Returns: new array, where each element is of different sign
array_sum()
calculates elementwise sum of two arrays
array_diff()
calculates elementwise difference of two arrays
array_product()
calculates elementwise product of two arrays
array_division()
calculates elementwise division of two arrays
ملاحظات الأخبار
v2Added:
apply_func(arr, func)
replace each element of array with func(element) and returns a new array
Parameters:
arr: - array
func: - function to replace. Must be one of func_*()
Returns: new array, where each element is func(element)
Removed:
func_replace_array(arr, func)
replace each element of array with func(element) and returns a new array
ملاحظات الأخبار
v3Added:
array_element_prod(arr)
calculates the product of array elements
Parameters:
arr (float[])
array_geomean(arr, method)
calculates the geometric mean of array elements
Parameters:
arr (float[]): - array
method (string): - calculation method. Can be chosen from ["auto", "naive", "log"]
Returns: geometric mean of array elements. 0 if array is empty
Updated:
divide_array(arr, n)
divides each element of array by divider and returns a new array
Parameters:
arr (float[]): - array
n (int): - divider
Returns: new array, where each element is divided by n
decrease_array(arr, n)
substracts decrement to each element of array and returns a new array
Parameters:
arr (int[]): - array
n (int): - decrement
Returns: new array, where each element is decreased by x
ملاحظات الأخبار
v4. Don't use v3 geomean for arr.size > 10ملاحظات الأخبار
v5array_decrease fix
ملاحظات الأخبار
v6Added unit tests
New constraints detected, which are from now ToDo:
- Don't use array_geomean(array with negative values in array
- Don't use apply_func(array, func_exp(x)) with negative values in array
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.