fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Reversal Structures

6 algorithms in Geometric Chart Patterns.

In this family#

  1. Double Top contract

    Double top detection: two comparable highs separated by a trough, confirmed on a close below the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. This topic wrapper accepts the close series and detection parameters, then delegates to the family detector core.

    doubleTop(close, params)
  2. Double Bottom contract

    Double bottom detection: two comparable lows separated by a peak, confirmed on a close above the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. This topic wrapper accepts the close series and detection parameters, then delegates to the family detector core.

    doubleBottom(close, params)
  3. Triple Top contract

    Triple top detection: three comparable highs, confirmed on a close below the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. This topic wrapper accepts the close series and detection parameters, then delegates to the family detector core.

    tripleTop(close, params)
  4. Triple Bottom contract

    Triple bottom detection: three comparable lows, confirmed on a close above the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. Takes the close series and detection parameters, then delegates to the family detector core.

    tripleBottom(close, params)
  5. Head and Shoulders contract

    Head and shoulders detection: a central high flanked by two lower highs, confirmed on a close below the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. This topic wrapper accepts the close series and detection parameters, then delegates to the family detector core.

    headAndShoulders(close, params)
  6. Inverse Head and Shoulders contract

    Inverse head and shoulders detection: a central low flanked by two higher lows, confirmed on a close above the neckline. Chart patterns are usually described in prose vague enough to fit almost anything; encoding one forces a decision about how close "comparable" is and how much confirmation is required, and this returns those tolerances alongside the verdict. This topic wrapper accepts the close series and detection parameters, then delegates to the family detector core.

    inverseHeadAndShoulders(close, params)

What they share#

Every topic here is a record-transform, so once you have called one the rest follow the same shape. Import paths differ only in the final segment:

ts
import { doubleTop } from "fintech-algorithms/geometric-chart-patterns/reversal-structures/double-top";
import { doubleBottom } from "fintech-algorithms/geometric-chart-patterns/reversal-structures/double-bottom";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Geometric Chart Patterns collects 27 algorithms across 4 families. For the concept behind this family rather than the call signatures, see the concept guides.