7a18a26daf
Implements Family 10 (Ehlers / Cycle) end-to-end across Rust core,
Python / Node / WASM bindings, fuzz, tests, benches and docs. This
is an entirely new family covering John Ehlers' digital-signal-
processing school of cycle analytics — a strong differentiator
versus TA-Lib and pandas-ta, which ship only fragments.
Indicators:
- MAMA (Mesa Adaptive MA) — multi-output { mama, fama }
- FAMA (Following Adaptive MA) — scalar wrapper around MAMA's slow line
- Fisher Transform — Gaussian-normalising price transform
- Inverse Fisher Transform — bounded oscillator (tanh-based)
- SuperSmoother — 2-pole Butterworth lowpass
- Roofing Filter — high-pass + SuperSmoother bandpass
- Decycler — price minus 2-pole high-pass (lag-free trend)
- Decycler Oscillator — fast / slow Decycler difference (MACD-like)
- Hilbert Dominant Cycle — phase-derived period estimator [6, 50]
- Sine Wave Indicator — sin(phase) with 45° lead companion
- Adaptive Cycle Indicator — half-period driver for adaptive oscillators
- Center of Gravity Oscillator — weighted-mass momentum
- Cybernetic Cycle Component — EasyLanguage classic
- Empirical Mode Decomposition — bandpass + envelope mean
- Ehlers Stochastic — Stochastic on Roofing Filter input, [-1, +1]
- Instantaneous Trendline — Ehlers 2-pole lag-free trend
Indicator count rises 71 -> 87 across nine families (was eight).
All sixteen pass batch == streaming equivalence, expose the standard
Indicator surface (update / batch / reset / is_ready / warmup_period
/ name), are fuzz-tested, benchmarked against the checked-in BTCUSDT
1-minute dataset and reach across all four bindings.
Wiki deep-dive drafts for every indicator + Sidebar / Overview /
Home / Warmup updates are staged under indicator-ideas/families/
wiki/family-10-ehlers-cycle/ in the main repo (ghost-ignored) for
the maintainer to publish to the wiki repo manually.
480 lines
17 KiB
JavaScript
480 lines
17 KiB
JavaScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/* prettier-ignore */
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
const { existsSync, readFileSync } = require('fs')
|
|
const { join } = require('path')
|
|
|
|
const { platform, arch } = process
|
|
|
|
let nativeBinding = null
|
|
let localFileExisted = false
|
|
let loadError = null
|
|
|
|
function isMusl() {
|
|
// For Node 10
|
|
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
try {
|
|
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
} catch (e) {
|
|
return true
|
|
}
|
|
} else {
|
|
const { glibcVersionRuntime } = process.report.getReport().header
|
|
return !glibcVersionRuntime
|
|
}
|
|
}
|
|
|
|
switch (platform) {
|
|
case 'android':
|
|
switch (arch) {
|
|
case 'arm64':
|
|
localFileExisted = existsSync(join(__dirname, 'wickra.android-arm64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.android-arm64.node')
|
|
} else {
|
|
nativeBinding = require('wickra-android-arm64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm':
|
|
localFileExisted = existsSync(join(__dirname, 'wickra.android-arm-eabi.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.android-arm-eabi.node')
|
|
} else {
|
|
nativeBinding = require('wickra-android-arm-eabi')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Android ${arch}`)
|
|
}
|
|
break
|
|
case 'win32':
|
|
switch (arch) {
|
|
case 'x64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.win32-x64-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.win32-x64-msvc.node')
|
|
} else {
|
|
nativeBinding = require('wickra-win32-x64-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'ia32':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.win32-ia32-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.win32-ia32-msvc.node')
|
|
} else {
|
|
nativeBinding = require('wickra-win32-ia32-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.win32-arm64-msvc.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.win32-arm64-msvc.node')
|
|
} else {
|
|
nativeBinding = require('wickra-win32-arm64-msvc')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Windows: ${arch}`)
|
|
}
|
|
break
|
|
case 'darwin':
|
|
localFileExisted = existsSync(join(__dirname, 'wickra.darwin-universal.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.darwin-universal.node')
|
|
} else {
|
|
nativeBinding = require('wickra-darwin-universal')
|
|
}
|
|
break
|
|
} catch {}
|
|
switch (arch) {
|
|
case 'x64':
|
|
localFileExisted = existsSync(join(__dirname, 'wickra.darwin-x64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.darwin-x64.node')
|
|
} else {
|
|
nativeBinding = require('wickra-darwin-x64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'arm64':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.darwin-arm64.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.darwin-arm64.node')
|
|
} else {
|
|
nativeBinding = require('wickra-darwin-arm64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on macOS: ${arch}`)
|
|
}
|
|
break
|
|
case 'freebsd':
|
|
if (arch !== 'x64') {
|
|
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
}
|
|
localFileExisted = existsSync(join(__dirname, 'wickra.freebsd-x64.node'))
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.freebsd-x64.node')
|
|
} else {
|
|
nativeBinding = require('wickra-freebsd-x64')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
case 'linux':
|
|
switch (arch) {
|
|
case 'x64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-x64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-x64-musl.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-x64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-x64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-x64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-x64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'arm64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-arm64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-arm64-musl.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-arm64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-arm64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-arm64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-arm64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'arm':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-arm-musleabihf.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-arm-musleabihf.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-arm-musleabihf')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-arm-gnueabihf.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-arm-gnueabihf.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-arm-gnueabihf')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 'riscv64':
|
|
if (isMusl()) {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-riscv64-musl.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-riscv64-musl.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-riscv64-musl')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
} else {
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-riscv64-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-riscv64-gnu.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-riscv64-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
}
|
|
break
|
|
case 's390x':
|
|
localFileExisted = existsSync(
|
|
join(__dirname, 'wickra.linux-s390x-gnu.node')
|
|
)
|
|
try {
|
|
if (localFileExisted) {
|
|
nativeBinding = require('./wickra.linux-s390x-gnu.node')
|
|
} else {
|
|
nativeBinding = require('wickra-linux-s390x-gnu')
|
|
}
|
|
} catch (e) {
|
|
loadError = e
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported architecture on Linux: ${arch}`)
|
|
}
|
|
break
|
|
default:
|
|
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
|
|
}
|
|
|
|
if (!nativeBinding) {
|
|
if (loadError) {
|
|
throw loadError
|
|
}
|
|
throw new Error(`Failed to load native binding`)
|
|
}
|
|
|
|
const { version, SMA, EMA, WMA, RSI, DEMA, TEMA, HMA, ROC, TRIX, SMMA, TRIMA, ZLEMA, MOM, CMO, DPO, StdDev, UlcerIndex, VerticalHorizontalFilter, ZScore, MACD, BollingerBands, ATR, Stochastic, OBV, ADX, ADXR, CCI, WilliamsR, MFI, PSAR, Keltner, Donchian, VWAP, RollingVWAP, AwesomeOscillator, Aroon, KAMA, RVI, PGO, KST, SMI, LaguerreRSI, ConnorsRSI, Inertia, ALMA, McGinleyDynamic, FRAMA, VIDYA, JMA, Alligator, EVWMA, APO, AwesomeOscillatorHistogram, CFO, ZeroLagMACD, ElderImpulse, STC, T3, TSI, PMO, TII, ADL, VolumePriceTrend, ChaikinMoneyFlow, ChaikinOscillator, ForceIndex, EaseOfMovement, KVO, VolumeOscillator, NVI, PVI, WilliamsAD, AnchoredVWAP, DemandIndex, TSV, VZO, MarketFacilitationIndex, SuperTrend, ChandelierExit, ChandeKrollStop, AtrTrailingStop, HiLoActivator, VoltyStop, YoyoExit, DonchianStop, PercentageTrailingStop, StepTrailingStop, RenkoTrailingStop, TypicalPrice, MedianPrice, WeightedClose, LinearRegression, LinRegSlope, AcceleratorOscillator, BalanceOfPower, ChoppinessIndex, TrueRange, ChaikinVolatility, LinRegAngle, BollingerBandwidth, PercentB, NATR, HistoricalVolatility, AroonOscillator, Vortex, RWI, WaveTrend, MassIndex, StochRSI, UltimateOscillator, PPO, Coppock, VWMA, RVIVolatility, ParkinsonVolatility, GarmanKlassVolatility, RogersSatchellVolatility, YangZhangVolatility, MaEnvelope, AccelerationBands, StarcBands, AtrBands, HurstChannel, LinRegChannel, StandardErrorBands, DoubleBollinger, TtmSqueeze, FractalChaosBands, VwapStdDevBands, ClassicPivots, FibonacciPivots, Camarilla, WoodiePivots, DemarkPivots, WilliamsFractals, ZigZag, TDSetup, TDSequential, TDDeMarker, TDREI, TDPressure, TDCombo, TDCountdown, TDLines, TDRangeProjection, TDDifferential, TDOpen, TDRiskLevel, SuperSmoother, FisherTransform, InverseFisherTransform, Decycler, DecyclerOscillator, RoofingFilter, CenterOfGravity, CyberneticCycle, InstantaneousTrendline, EhlersStochastic, EmpiricalModeDecomposition, HilbertDominantCycle, AdaptiveCycle, SineWave, MAMA, FAMA } = nativeBinding
|
|
|
|
module.exports.version = version
|
|
module.exports.SMA = SMA
|
|
module.exports.EMA = EMA
|
|
module.exports.WMA = WMA
|
|
module.exports.RSI = RSI
|
|
module.exports.DEMA = DEMA
|
|
module.exports.TEMA = TEMA
|
|
module.exports.HMA = HMA
|
|
module.exports.ROC = ROC
|
|
module.exports.TRIX = TRIX
|
|
module.exports.SMMA = SMMA
|
|
module.exports.TRIMA = TRIMA
|
|
module.exports.ZLEMA = ZLEMA
|
|
module.exports.MOM = MOM
|
|
module.exports.CMO = CMO
|
|
module.exports.DPO = DPO
|
|
module.exports.StdDev = StdDev
|
|
module.exports.UlcerIndex = UlcerIndex
|
|
module.exports.VerticalHorizontalFilter = VerticalHorizontalFilter
|
|
module.exports.ZScore = ZScore
|
|
module.exports.MACD = MACD
|
|
module.exports.BollingerBands = BollingerBands
|
|
module.exports.ATR = ATR
|
|
module.exports.Stochastic = Stochastic
|
|
module.exports.OBV = OBV
|
|
module.exports.ADX = ADX
|
|
module.exports.ADXR = ADXR
|
|
module.exports.CCI = CCI
|
|
module.exports.WilliamsR = WilliamsR
|
|
module.exports.MFI = MFI
|
|
module.exports.PSAR = PSAR
|
|
module.exports.Keltner = Keltner
|
|
module.exports.Donchian = Donchian
|
|
module.exports.VWAP = VWAP
|
|
module.exports.RollingVWAP = RollingVWAP
|
|
module.exports.AwesomeOscillator = AwesomeOscillator
|
|
module.exports.Aroon = Aroon
|
|
module.exports.KAMA = KAMA
|
|
module.exports.RVI = RVI
|
|
module.exports.PGO = PGO
|
|
module.exports.KST = KST
|
|
module.exports.SMI = SMI
|
|
module.exports.LaguerreRSI = LaguerreRSI
|
|
module.exports.ConnorsRSI = ConnorsRSI
|
|
module.exports.Inertia = Inertia
|
|
module.exports.ALMA = ALMA
|
|
module.exports.McGinleyDynamic = McGinleyDynamic
|
|
module.exports.FRAMA = FRAMA
|
|
module.exports.VIDYA = VIDYA
|
|
module.exports.JMA = JMA
|
|
module.exports.Alligator = Alligator
|
|
module.exports.EVWMA = EVWMA
|
|
module.exports.APO = APO
|
|
module.exports.AwesomeOscillatorHistogram = AwesomeOscillatorHistogram
|
|
module.exports.CFO = CFO
|
|
module.exports.ZeroLagMACD = ZeroLagMACD
|
|
module.exports.ElderImpulse = ElderImpulse
|
|
module.exports.STC = STC
|
|
module.exports.T3 = T3
|
|
module.exports.TSI = TSI
|
|
module.exports.PMO = PMO
|
|
module.exports.TII = TII
|
|
module.exports.ADL = ADL
|
|
module.exports.VolumePriceTrend = VolumePriceTrend
|
|
module.exports.ChaikinMoneyFlow = ChaikinMoneyFlow
|
|
module.exports.ChaikinOscillator = ChaikinOscillator
|
|
module.exports.ForceIndex = ForceIndex
|
|
module.exports.EaseOfMovement = EaseOfMovement
|
|
module.exports.KVO = KVO
|
|
module.exports.VolumeOscillator = VolumeOscillator
|
|
module.exports.NVI = NVI
|
|
module.exports.PVI = PVI
|
|
module.exports.WilliamsAD = WilliamsAD
|
|
module.exports.AnchoredVWAP = AnchoredVWAP
|
|
module.exports.DemandIndex = DemandIndex
|
|
module.exports.TSV = TSV
|
|
module.exports.VZO = VZO
|
|
module.exports.MarketFacilitationIndex = MarketFacilitationIndex
|
|
module.exports.SuperTrend = SuperTrend
|
|
module.exports.ChandelierExit = ChandelierExit
|
|
module.exports.ChandeKrollStop = ChandeKrollStop
|
|
module.exports.AtrTrailingStop = AtrTrailingStop
|
|
module.exports.HiLoActivator = HiLoActivator
|
|
module.exports.VoltyStop = VoltyStop
|
|
module.exports.YoyoExit = YoyoExit
|
|
module.exports.DonchianStop = DonchianStop
|
|
module.exports.PercentageTrailingStop = PercentageTrailingStop
|
|
module.exports.StepTrailingStop = StepTrailingStop
|
|
module.exports.RenkoTrailingStop = RenkoTrailingStop
|
|
module.exports.TypicalPrice = TypicalPrice
|
|
module.exports.MedianPrice = MedianPrice
|
|
module.exports.WeightedClose = WeightedClose
|
|
module.exports.LinearRegression = LinearRegression
|
|
module.exports.LinRegSlope = LinRegSlope
|
|
module.exports.AcceleratorOscillator = AcceleratorOscillator
|
|
module.exports.BalanceOfPower = BalanceOfPower
|
|
module.exports.ChoppinessIndex = ChoppinessIndex
|
|
module.exports.TrueRange = TrueRange
|
|
module.exports.ChaikinVolatility = ChaikinVolatility
|
|
module.exports.LinRegAngle = LinRegAngle
|
|
module.exports.BollingerBandwidth = BollingerBandwidth
|
|
module.exports.PercentB = PercentB
|
|
module.exports.NATR = NATR
|
|
module.exports.HistoricalVolatility = HistoricalVolatility
|
|
module.exports.AroonOscillator = AroonOscillator
|
|
module.exports.Vortex = Vortex
|
|
module.exports.RWI = RWI
|
|
module.exports.WaveTrend = WaveTrend
|
|
module.exports.MassIndex = MassIndex
|
|
module.exports.StochRSI = StochRSI
|
|
module.exports.UltimateOscillator = UltimateOscillator
|
|
module.exports.PPO = PPO
|
|
module.exports.Coppock = Coppock
|
|
module.exports.VWMA = VWMA
|
|
module.exports.RVIVolatility = RVIVolatility
|
|
module.exports.ParkinsonVolatility = ParkinsonVolatility
|
|
module.exports.GarmanKlassVolatility = GarmanKlassVolatility
|
|
module.exports.RogersSatchellVolatility = RogersSatchellVolatility
|
|
module.exports.YangZhangVolatility = YangZhangVolatility
|
|
module.exports.MaEnvelope = MaEnvelope
|
|
module.exports.AccelerationBands = AccelerationBands
|
|
module.exports.StarcBands = StarcBands
|
|
module.exports.AtrBands = AtrBands
|
|
module.exports.HurstChannel = HurstChannel
|
|
module.exports.LinRegChannel = LinRegChannel
|
|
module.exports.StandardErrorBands = StandardErrorBands
|
|
module.exports.DoubleBollinger = DoubleBollinger
|
|
module.exports.TtmSqueeze = TtmSqueeze
|
|
module.exports.FractalChaosBands = FractalChaosBands
|
|
module.exports.VwapStdDevBands = VwapStdDevBands
|
|
module.exports.ClassicPivots = ClassicPivots
|
|
module.exports.FibonacciPivots = FibonacciPivots
|
|
module.exports.Camarilla = Camarilla
|
|
module.exports.WoodiePivots = WoodiePivots
|
|
module.exports.DemarkPivots = DemarkPivots
|
|
module.exports.WilliamsFractals = WilliamsFractals
|
|
module.exports.ZigZag = ZigZag
|
|
module.exports.TDSetup = TDSetup
|
|
module.exports.TDSequential = TDSequential
|
|
module.exports.TDDeMarker = TDDeMarker
|
|
module.exports.TDREI = TDREI
|
|
module.exports.TDPressure = TDPressure
|
|
module.exports.TDCombo = TDCombo
|
|
module.exports.TDCountdown = TDCountdown
|
|
module.exports.TDLines = TDLines
|
|
module.exports.TDRangeProjection = TDRangeProjection
|
|
module.exports.TDDifferential = TDDifferential
|
|
module.exports.TDOpen = TDOpen
|
|
module.exports.TDRiskLevel = TDRiskLevel
|
|
module.exports.SuperSmoother = SuperSmoother
|
|
module.exports.FisherTransform = FisherTransform
|
|
module.exports.InverseFisherTransform = InverseFisherTransform
|
|
module.exports.Decycler = Decycler
|
|
module.exports.DecyclerOscillator = DecyclerOscillator
|
|
module.exports.RoofingFilter = RoofingFilter
|
|
module.exports.CenterOfGravity = CenterOfGravity
|
|
module.exports.CyberneticCycle = CyberneticCycle
|
|
module.exports.InstantaneousTrendline = InstantaneousTrendline
|
|
module.exports.EhlersStochastic = EhlersStochastic
|
|
module.exports.EmpiricalModeDecomposition = EmpiricalModeDecomposition
|
|
module.exports.HilbertDominantCycle = HilbertDominantCycle
|
|
module.exports.AdaptiveCycle = AdaptiveCycle
|
|
module.exports.SineWave = SineWave
|
|
module.exports.MAMA = MAMA
|
|
module.exports.FAMA = FAMA
|