UNPKG

@thi.ng/transducers-stats

Version:

Transducers for statistical / technical analysis

11 lines (10 loc) 320 B
import { comp } from "@thi.ng/transducers/comp"; import { iterator1 } from "@thi.ng/transducers/iterator"; import { ema } from "./ema.js"; import { roc } from "./roc.js"; function trix(period, src) { return src ? iterator1(trix(period), src) : comp(ema(period), ema(period), ema(period), roc(1)); } export { trix };