• Finds signals representing significant changes or anomalies in a numeric time series.

    The function uses Z-Score based peak detection to identify periods where values deviate significantly from the moving average, indicating potential market turning points or trend changes.

    Parameters

    • signalsConfig: ISignalsConfig

      Configuration object for peak detection containing:

      • values: Array of numerical values to analyse (typically closing prices)
      • config: Z-Score algorithm parameters (lag, threshold, influence)

    Returns IPeak[]

    An array of detected peaks with their positions and directions:

    • position: Index in the original array where the signal was detected
    • direction: 1 for bullish (upward) signals, -1 for bearish (downward) signals

    Example

    const peaks = findSignals({
    values: [101, 102, 99, 101, 102, 107, 109, 105, 102, 100, 97, 95, 97],
    config: { lag: 5, threshold: 2.5, influence: 0.5 }
    });

Generated using TypeDoc