@pond-ts/financial API Reference
    Preparing search index...

    Function chaikinOscillator

    • Chaikin Oscillator — a MACD of the Accumulation/Distribution line:

      chaikinOsc = EMA(AD, fastPeriod) − EMA(AD, slowPeriod)        3 and 10
      

      accumulationDistribution is a level whose absolute value means nothing; this reads its momentum, so a positive oscillator says accumulation is accelerating and a cross of zero is the signal Chaikin named it for. Appends one column, undefined until the slow EMA has its slowPeriod samples.

      The A/D line comes from accumulationDistributionValues — the same array the standalone study appends, not a second derivation — and both EMAs from the K2 engine's array door (movingAverageValues), so this study owns no loop of its own.

      TA-Lib's ADOSC, exactly: cross-checked bar-for-bar in the oracle fixture at {3, 10} and {4, 12} (delta 0, identical warm-up masks).

      That is worth a sentence, because every other EMA-family study here carries a documented seed delta from TA-Lib (macd, trix, priceOscillator: pond seeds an EMA on the first sample, TA-Lib on the SMA of the first n, and the difference is a decaying transient). ADOSC is the exception in TA-Lib's own library — its C implementation seeds both EMAs with the first A/D value and then runs the recursion, which is pond's convention exactly. Measured on 40 bars: pond's seed matches ADOSC to 0.0, while the SMA-seeded reconstruction of the same formula differs by up to 294.8. So there is no transient to bound here and the oracle asserts equality.

      • Warm-up is the slow EMA'sundefined for the first slowPeriod − 1 rows, length-preserving.
      • A leading gap shifts the A/D seed, so the oscillator starts late rather than coming back empty.
      • An interior gap ends the line (a flat bar does not — it adds 0). The A/D level is unknown from there on (accumulationDistributionValues), and so is every average of it. This is the obv asymmetry inherited whole, and the documented delta from TA-Lib's flat-bar handling comes with it.
      • Linear in volume, invariant under an affine change of price — the A/D line's properties, preserved by the difference of two averages. Pinned by property tests.
      • fastPeriod must be shorter than slowPeriod; a caller who swaps them wants the negated series, and obliging silently would make the sign of every reading meaningless (priceOscillator's rule).

      Type Parameters

      • S extends SeriesSchema
      • const Output extends string = "chaikinOsc"

      Parameters

      Returns TimeSeries<
          readonly [S[0], ValueColumnsForSchema<S>, OptionalNumberColumn<Output>],
      >