zigzag#

swordfish.function.zigzag()#

zigzag is mainly used to filter values with smaller movements in HL. Only extreme points that satisfy the conditions will be output. If HL is a vector, return a vector with the same length as HL; if HL is a matrix, return a vector with the same number of rows as HL.

参数:
  • HL (Constant) -- A numeric vector or a numeric matrix with two columns.

  • change (Constant, optional) -- The minimum threshold for extreme value movement, by default DFLT

  • percent (Constant, optional) -- A Boolean value indicating whether change is used as a percentage, by default DFLT

  • retrace (Constant, optional) --

    A Boolean value, by default DFLT

    • true: change represents a retracement of the previous move.

    • false: change represents the change between the extreme points.

  • lastExtreme (Constant, optional) -- A Boolean value indicating whether to output the last point if multiple consecutive points have the same value, by default DFLT.