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

Trend Systems

8 algorithms in Technical Indicators · 8 with asserted arithmetic.

In this family#

  1. MACD verified

    Moving average convergence/divergence: the gap between a fast and a slow EMA, its own EMA as a signal line, and the difference between them as a histogram.

    macd(values, fastSpan, slowSpan, signalSpan)
  2. Percentage Price Oscillator (PPO) verified

    MACD expressed as a percentage of the slow EMA rather than in price units, which makes readings comparable across instruments and across time in a way MACD is not.

    ppo(values, fastSpan, slowSpan, signalSpan)
  3. Aroon Up, Down, and Oscillator verified

    Measures how recently the highest high and lowest low occurred within the lookback, expressed as 0–100. Unlike most trend indicators it reads *elapsed time* rather than price distance.

    aroon(high, low, period)
  4. Directional Movement verified

    The components beneath ADX: directional movement in each direction, Wilder-smoothed, divided by the average true range to give +DI and −DI.

    directionalMovement(high, low, close, period)
  5. Average Directional Index (ADX) verified

    Average directional index: the smoothed magnitude of the gap between +DI and −DI. It measures whether a trend exists at all, and says nothing about its direction — which is why it is used as a filter rather than a signal.

    adx(high, low, close, period)
  6. Ichimoku Cloud verified

    The five Ichimoku lines. Two of them are plotted shifted forward and one shifted backward, so the series a chart draws is not the series computed at that index.

    ichimoku(high, low, close, conversionPeriod, basePeriod, spanBPeriod, displacement)
  7. Parabolic SAR verified

    Stop-and-reverse: a trailing stop that accelerates toward price while a trend persists and flips side when price crosses it. Path-dependent — the whole series follows from the initial direction.

    parabolicSar(high, low, initialDirection, accelerationStep, accelerationMax)
  8. Supertrend verified

    An ATR-scaled band around the median price that ratchets in the direction of the trend and only flips when close crosses it. The band never loosens while the trend holds.

    supertrend(high, low, close, period, multiplier)

What they share#

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

ts
import { macd } from "fintech-algorithms/technical-indicators/trend-systems/macd";
import { ppo } from "fintech-algorithms/technical-indicators/trend-systems/percentage-price-oscillator";

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

Where this sits#

Technical Indicators collects 37 algorithms across 5 families. For the concept behind this family rather than the call signatures, see the concept guides.