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

High/Low and Trend Breadth

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

In this family#

  1. New Highs–New Lows verified

    Counts issues making new 52-week highs and lows. Unlike advance/decline it measures position against a long lookback rather than one session, so it detects a rally where fewer and fewer names reach new ground.

    calculate(records, decisionTime)
  2. High-Low Ratio verified

    New highs as a share of new highs plus new lows — the scale-free form, comparable across universes and eras.

    calculate(records, decisionTime)
  3. High-Low Index verified

    A moving average of the high–low ratio, which turns a noisy daily reading into something with a usable trend.

    calculate(records, decisionTime)
  4. Percent Above 20-Day MA verified

    The share of the universe trading above its own 20-day moving average — a short-horizon participation gauge that turns over quickly.

    evaluateSnapshot(snapshot, decisionTime)
  5. Percent Above 50-Day MA verified

    The same participation measure over 50 sessions — the intermediate-horizon reading, and the one most often quoted for trend health.

    evaluateSnapshot(snapshot, decisionTime)
  6. Percent Above 200-Day MA verified

    Participation over 200 sessions — the long-horizon gauge. A rally with 80% of names above their 200-day average is a different market from one with 35%, even at the same index level.

    evaluateSnapshot(snapshot, decisionTime)

What they share#

Every topic here is a record-transform</code> or <code>snapshot-evaluate, 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/high-low-and-trend-breadth/new-highs-new-lows";
import { calculate } from "fintech-algorithms/market-breadth-and-internals/high-low-and-trend-breadth/high-low-ratio";

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.