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

Thrust and Pressure

6 algorithms in Market Breadth and Internals · 6 with asserted arithmetic.

In this family#

  1. Zweig Breadth Thrust verified

    Detects the rare initiation signal: the advance ratio moving from below a low threshold to above a high one inside a bounded number of sessions. It fires a handful of times in a generation, which is the point — and also why it cannot be validated on a short sample.

    calculate(rows, emaLength, lowThreshold, highThreshold, maxSessions)
  2. Arms Index (TRIN) verified

    TRIN: the advance/decline issue ratio divided by the advance/decline volume ratio. Above 1 means declining issues are absorbing proportionally more volume than their numbers suggest — the arithmetic is a comparison of two ratios, and inverting either flips the reading.

    calculate(row)
  3. Advance/Decline Volume Line verified

    The cumulative line built from advancing minus declining volume rather than issue counts. Where the issue-based line counts participants, this one weights them by how much they traded.

    calculate(rows, seed)
  4. Upside/Downside Volume Ratio verified

    Advancing volume over declining volume for one session. Extreme readings mark the days that matter — a 9-to-1 up day is a recognised initiation signal precisely because it is rare.

    calculate(row)
  5. Cumulative TICK verified

    Accumulates the net count of issues trading on an uptick versus a downtick. An intraday pressure gauge — it measures the balance of buying and selling *urgency* within the session rather than the outcome at the close.

    calculate(rows, seed, intervalSeconds)
  6. Breadth-Divergence Detector verified

    Flags sessions where the index and a breadth measure move meaningfully in opposite directions — the classic warning that an advance is being carried by fewer and fewer names.

    calculate(rows, left, right, minPriceChange, minBreadthSeparation, breadthScale)

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 { calculate } from "fintech-algorithms/market-breadth-and-internals/thrust-and-pressure/zweig-breadth-thrust";
import { calculate } from "fintech-algorithms/market-breadth-and-internals/thrust-and-pressure/arms-index-trin";

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

Where this sits#

Market Breadth and Internals collects 28 algorithms across 5 families. For the concept behind this family rather than the call signatures, see the concept guides.