PINE LIBRARY

FunctionArrayReduce

已更新
Library "FunctionArrayReduce"
A limited method to reduce a array using a mathematical formula.

float_(formula, samples, arguments, initial_value) Method to reduce a array using a mathematical formula.
  Parameters:
    formula: string, the mathematical formula, accepts some default name codes (index, output, previous, current, integer index of arguments array).
    samples: float array, the data to process.
    arguments: float array, the extra arguments of the formula.
    initial_value: float, default=0, a initial base value for the process.
  Returns: float.
Notes:
** if initial value is specified as "na" it will default to the first element of samples.
版本注释
v2
Update: supports boolean operations and float variables now.
arraysMATHreducestrings

Pine脚本库

本着真正的TradingView精神,作者将此Pine代码发布为开源脚本库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私下或在其它开源出版物中使用此脚本库,但在出版物中重复使用此代码受网站规则约束。

免责声明