Trend Systems
19 algorithms in Technical Indicators · 19 with asserted arithmetic.
In this family#
-
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) -
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) -
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) -
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) -
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) -
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) -
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) -
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) -
Average Directional Index Rating (ADXR) verified
Runs the Wilder directional-movement system over the bars and returns the smoothed
plus_di,minus_diandadxlines together withadxr, the average of the currentadxand theadxfromperiodbars earlier.averageDirectionalIndexRatingAdxr(input) -
Vortex Indicator (+VI/−VI) verified
Sums the upward and downward vortex movements over a rolling window and divides each by the summed true range, giving the paired
plus_viandminus_vilines.vortexIndicatorViVi(input) -
Choppiness Index verified
Compares the summed true range over a window against the window's own high-to-low span, on a base-10 log scale normalised by the window length, so a trending stretch scores low and a choppy one scores high.
choppinessIndex(input) -
Trend Intensity Index verified
Splits each close into the part above and the part below a simple moving average, sums each part over a second window, and reports the upside sum as a percentage of the two sums combined.
trendIntensityIndex(input) -
QStick verified
Averages the candle body, close minus open, over a rolling window, so a positive reading means the window closed above its opens more often than not.
qstick(input) -
Mass Index verified
Takes the ratio of a 9-period EMA of the high-low range to the 9-period EMA of that EMA, then sums the ratio over a longer window, so range expansion after a contraction pushes the total up.
massIndex(input) -
Vertical Horizontal Filter verified
Divides the highest-to-lowest close span over a window by the sum of the absolute bar-to-bar close changes in that same window, separating directed movement from back-and-forth movement.
verticalHorizontalFilter(input) -
Random Walk Index (High/Low) verified
Scores how far price has travelled against what a random walk would explain, by taking the largest displacement-over-expected-range ratio across every lookback length from 2 up to
period, once upward and once downward.randomWalkIndexHighLow(input) -
Trend Trigger Factor verified
Compares the current window's high and low against the immediately prior window's, and reports the buy-minus-sell power as a percentage of their average.
trendTriggerFactor(input) -
Directional Trend Index verified
Wilder-smooths the net of the upward high moves against the downward low moves, and divides it by the smoothed total of both, giving a signed percentage that runs from -100 to 100.
directionalTrendIndex(input) -
Trend Strength Index verified
Measures the absolute gap between a fast and a slow EMA of the close in units of average true range, so the spread is comparable across volatility regimes.
trendStrengthIndex(input)
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:
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 137 algorithms across 9 families. For the concept behind this family rather than the call signatures, see the concept guides.