wickra-wasm 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -5
- package/package.json +3 -3
- package/wickra_wasm.d.ts +85 -0
- package/wickra_wasm.js +1 -1
- package/wickra_wasm_bg.js +467 -0
- package/wickra_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://wickra.org"><img src="https://wickra.org/og-banner.webp" alt="Wickra — streaming-first technical indicators" width="100%"></a>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
5
|
[](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/wickra-lib/wickra/actions/workflows/codeql.yml)
|
|
4
7
|
[](https://codecov.io/gh/wickra-lib/wickra)
|
|
8
|
+
[](https://github.com/wickra-lib/wickra/releases/latest)
|
|
5
9
|
[](https://crates.io/crates/wickra)
|
|
6
10
|
[](https://pypi.org/project/wickra/)
|
|
7
11
|
[](https://www.npmjs.com/package/wickra)
|
|
8
12
|
[](LICENSE)
|
|
13
|
+
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
|
|
14
|
+
[](https://github.com/wickra-lib/wickra/attestations)
|
|
15
|
+
[](https://docs.wickra.org)
|
|
9
16
|
|
|
10
17
|
**Streaming-first technical indicators. Install with `pip install wickra` — no system dependencies.**
|
|
11
18
|
|
|
@@ -31,6 +38,25 @@ for price in live_feed:
|
|
|
31
38
|
print("overbought")
|
|
32
39
|
```
|
|
33
40
|
|
|
41
|
+
## Documentation
|
|
42
|
+
|
|
43
|
+
Full documentation lives at **[docs.wickra.org](https://docs.wickra.org)**:
|
|
44
|
+
|
|
45
|
+
- **Quickstarts** — [Rust](https://docs.wickra.org/Quickstart-Rust),
|
|
46
|
+
[Python](https://docs.wickra.org/Quickstart-Python),
|
|
47
|
+
[Node](https://docs.wickra.org/Quickstart-Node),
|
|
48
|
+
[WASM](https://docs.wickra.org/Quickstart-WASM).
|
|
49
|
+
- **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
|
|
50
|
+
every one of the 219 indicators; start at the
|
|
51
|
+
[indicators overview](https://docs.wickra.org/Indicators-Overview).
|
|
52
|
+
- **Reference** — [warmup periods](https://docs.wickra.org/Warmup-Periods),
|
|
53
|
+
[streaming vs batch](https://docs.wickra.org/Streaming-vs-Batch),
|
|
54
|
+
[indicator chaining](https://docs.wickra.org/Indicator-Chaining), the
|
|
55
|
+
[data layer](https://docs.wickra.org/Data-Layer).
|
|
56
|
+
- **Guides** — [Cookbook](https://docs.wickra.org/Cookbook),
|
|
57
|
+
[TA-Lib migration](https://docs.wickra.org/TA-Lib-Migration),
|
|
58
|
+
[FAQ](https://docs.wickra.org/FAQ).
|
|
59
|
+
|
|
34
60
|
## Why Wickra exists
|
|
35
61
|
|
|
36
62
|
The Python TA ecosystem has plenty of libraries — TA-Lib, pandas-ta, finta,
|
|
@@ -109,9 +135,10 @@ python -m benchmarks.compare_libraries
|
|
|
109
135
|
|
|
110
136
|
## Indicators
|
|
111
137
|
|
|
112
|
-
|
|
138
|
+
219 streaming-first indicators across sixteen families. Every one passes the
|
|
113
139
|
`batch == streaming` equivalence test, reference-value tests, and reset
|
|
114
|
-
semantics tests.
|
|
140
|
+
semantics tests. Each has a per-indicator deep dive (formula, parameters,
|
|
141
|
+
warmup) at [docs.wickra.org](https://docs.wickra.org/Indicators-Overview).
|
|
115
142
|
|
|
116
143
|
| Family | Indicators |
|
|
117
144
|
|--------|-----------|
|
|
@@ -123,7 +150,7 @@ semantics tests.
|
|
|
123
150
|
| Bands & Channels | MA Envelope, Acceleration Bands, STARC Bands, ATR Bands, Hurst Channel, LinReg Channel, Standard Error Bands, Double Bollinger Bands, TTM Squeeze, Fractal Chaos Bands, VWAP StdDev Bands |
|
|
124
151
|
| Trailing Stops | Parabolic SAR, SuperTrend, Chandelier Exit, Chande Kroll Stop, ATR Trailing Stop, HiLo Activator, Volty Stop, Yo-Yo Exit, Donchian Channel Stop, Percentage Trailing Stop, Step Trailing Stop, Renko Trailing Stop |
|
|
125
152
|
| Volume | OBV, VWAP (cumulative + rolling), ADL, Volume-Price Trend, Chaikin Money Flow, Chaikin Oscillator, Force Index, Ease of Movement, Klinger Volume Oscillator, Volume Oscillator, NVI, PVI, Williams A/D, Anchored VWAP, Demand Index, TSV, VZO, Market Facilitation Index |
|
|
126
|
-
| Price Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope, Z-Score, Linear Regression Angle, Variance, Coefficient of Variation, Skewness, Kurtosis, Standard Error, Detrended StdDev, R², Median Absolute Deviation, Autocorrelation, Hurst Exponent, Pearson Correlation, Beta, Spearman Correlation |
|
|
153
|
+
| Price Statistics | Typical Price, Median Price, Weighted Close, Linear Regression, Linear Regression Slope, Z-Score, Linear Regression Angle, Variance, Coefficient of Variation, Skewness, Kurtosis, Standard Error, Detrended StdDev, R², Median Absolute Deviation, Autocorrelation, Hurst Exponent, Pearson Correlation, Beta, Pairwise Beta, Pair Spread Z-Score, Lead-Lag Cross-Correlation, Cointegration, Relative Strength A-vs-B, Spearman Correlation |
|
|
127
154
|
| Ehlers / Cycle (DSP) | MAMA, FAMA, Fisher Transform, Inverse Fisher Transform, SuperSmoother, Hilbert Dominant Cycle, Sine Wave, Decycler, Decycler Oscillator, Roofing Filter, Center of Gravity, Cybernetic Cycle, Adaptive Cycle, Empirical Mode Decomposition, Ehlers Stochastic, Instantaneous Trendline |
|
|
128
155
|
| Pivots & S/R | Classic Pivots, Fibonacci Pivots, Camarilla, Woodie Pivots, DeMark Pivots, Williams Fractals, ZigZag |
|
|
129
156
|
| DeMark | TD Setup, TD Sequential, TD DeMarker, TD REI, TD Pressure, TD Combo, TD Countdown, TD Lines, TD Range Projection, TD Differential, TD Open, TD Risk Level |
|
|
@@ -203,7 +230,7 @@ A Python live-trading example using the public `websockets` package lives at
|
|
|
203
230
|
```
|
|
204
231
|
wickra/
|
|
205
232
|
├── crates/
|
|
206
|
-
│ ├── wickra-core/ core engine + all
|
|
233
|
+
│ ├── wickra-core/ core engine + all 219 indicators
|
|
207
234
|
│ ├── wickra/ top-level facade crate (publishes on crates.io) + benches/
|
|
208
235
|
│ └── wickra-data/ CSV reader, tick aggregator, live exchange feeds
|
|
209
236
|
├── bindings/
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "wickra-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"collaborators": [
|
|
5
|
-
"kingchenc <wickra.
|
|
5
|
+
"kingchenc <support@wickra.org>"
|
|
6
6
|
],
|
|
7
7
|
"description": "WASM bindings for the Wickra streaming-first technical indicators library.",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.4.1",
|
|
9
9
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"technical-analysis",
|
|
32
32
|
"ta"
|
|
33
33
|
],
|
|
34
|
-
"author": "kingchenc <wickra.
|
|
34
|
+
"author": "kingchenc <support@wickra.org>",
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/wickra-lib/wickra/issues"
|
|
37
37
|
}
|
package/wickra_wasm.d.ts
CHANGED
|
@@ -432,6 +432,24 @@ export class CoefficientOfVariation {
|
|
|
432
432
|
warmupPeriod(): number;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
|
+
export class Cointegration {
|
|
436
|
+
free(): void;
|
|
437
|
+
[Symbol.dispose](): void;
|
|
438
|
+
/**
|
|
439
|
+
* Flat `Float64Array` of length `3 * n`:
|
|
440
|
+
* `[hedgeRatio0, spread0, adfStat0, hedgeRatio1, ...]`. Warmup rows are NaN.
|
|
441
|
+
*/
|
|
442
|
+
batch(a: Float64Array, b: Float64Array): Float64Array;
|
|
443
|
+
isReady(): boolean;
|
|
444
|
+
constructor(period: number, adf_lags: number);
|
|
445
|
+
reset(): void;
|
|
446
|
+
/**
|
|
447
|
+
* Returns `{ hedgeRatio, spread, adfStat }`, or `null` during warmup.
|
|
448
|
+
*/
|
|
449
|
+
update(a: number, b: number): any;
|
|
450
|
+
warmupPeriod(): number;
|
|
451
|
+
}
|
|
452
|
+
|
|
435
453
|
export class ConditionalValueAtRisk {
|
|
436
454
|
free(): void;
|
|
437
455
|
[Symbol.dispose](): void;
|
|
@@ -1075,6 +1093,25 @@ export class LaguerreRSI {
|
|
|
1075
1093
|
warmupPeriod(): number;
|
|
1076
1094
|
}
|
|
1077
1095
|
|
|
1096
|
+
export class LeadLagCrossCorrelation {
|
|
1097
|
+
free(): void;
|
|
1098
|
+
[Symbol.dispose](): void;
|
|
1099
|
+
/**
|
|
1100
|
+
* Flat `Float64Array` of length `2 * n`: `[lag0, corr0, lag1, corr1, ...]`.
|
|
1101
|
+
* Warmup positions are NaN.
|
|
1102
|
+
*/
|
|
1103
|
+
batch(a: Float64Array, b: Float64Array): Float64Array;
|
|
1104
|
+
isReady(): boolean;
|
|
1105
|
+
constructor(window: number, max_lag: number);
|
|
1106
|
+
reset(): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* Returns `{ lag, correlation }`, or `null` during warmup. Positive lag
|
|
1109
|
+
* means `a` leads `b`.
|
|
1110
|
+
*/
|
|
1111
|
+
update(a: number, b: number): any;
|
|
1112
|
+
warmupPeriod(): number;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1078
1115
|
export class LinRegAngle {
|
|
1079
1116
|
free(): void;
|
|
1080
1117
|
[Symbol.dispose](): void;
|
|
@@ -1384,6 +1421,36 @@ export class PainIndex {
|
|
|
1384
1421
|
warmupPeriod(): number;
|
|
1385
1422
|
}
|
|
1386
1423
|
|
|
1424
|
+
export class PairSpreadZScore {
|
|
1425
|
+
free(): void;
|
|
1426
|
+
[Symbol.dispose](): void;
|
|
1427
|
+
/**
|
|
1428
|
+
* Batch over two equally-sized arrays of prices. Returns one `f64` per
|
|
1429
|
+
* input position (`NaN` during warmup).
|
|
1430
|
+
*/
|
|
1431
|
+
batch(a: Float64Array, b: Float64Array): Float64Array;
|
|
1432
|
+
isReady(): boolean;
|
|
1433
|
+
constructor(beta_period: number, z_period: number);
|
|
1434
|
+
reset(): void;
|
|
1435
|
+
update(a: number, b: number): number | undefined;
|
|
1436
|
+
warmupPeriod(): number;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
export class PairwiseBeta {
|
|
1440
|
+
free(): void;
|
|
1441
|
+
[Symbol.dispose](): void;
|
|
1442
|
+
/**
|
|
1443
|
+
* Batch over two equally-sized arrays. Returns one `f64` per
|
|
1444
|
+
* input position (`NaN` during warmup).
|
|
1445
|
+
*/
|
|
1446
|
+
batch(x: Float64Array, y: Float64Array): Float64Array;
|
|
1447
|
+
isReady(): boolean;
|
|
1448
|
+
constructor(period: number);
|
|
1449
|
+
reset(): void;
|
|
1450
|
+
update(x: number, y: number): number | undefined;
|
|
1451
|
+
warmupPeriod(): number;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1387
1454
|
export class ParkinsonVolatility {
|
|
1388
1455
|
free(): void;
|
|
1389
1456
|
[Symbol.dispose](): void;
|
|
@@ -1530,6 +1597,24 @@ export class RecoveryFactor {
|
|
|
1530
1597
|
warmupPeriod(): number;
|
|
1531
1598
|
}
|
|
1532
1599
|
|
|
1600
|
+
export class RelativeStrengthAB {
|
|
1601
|
+
free(): void;
|
|
1602
|
+
[Symbol.dispose](): void;
|
|
1603
|
+
/**
|
|
1604
|
+
* Flat `Float64Array` of length `3 * n`:
|
|
1605
|
+
* `[ratio0, ratioMa0, ratioRsi0, ratio1, ...]`. Warmup rows are NaN.
|
|
1606
|
+
*/
|
|
1607
|
+
batch(a: Float64Array, b: Float64Array): Float64Array;
|
|
1608
|
+
isReady(): boolean;
|
|
1609
|
+
constructor(ma_period: number, rsi_period: number);
|
|
1610
|
+
reset(): void;
|
|
1611
|
+
/**
|
|
1612
|
+
* Returns `{ ratio, ratioMa, ratioRsi }`, or `null` during warmup.
|
|
1613
|
+
*/
|
|
1614
|
+
update(a: number, b: number): any;
|
|
1615
|
+
warmupPeriod(): number;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1533
1618
|
export class RenkoTrailingStop {
|
|
1534
1619
|
free(): void;
|
|
1535
1620
|
[Symbol.dispose](): void;
|
package/wickra_wasm.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./wickra_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
|
-
ADL, ADX, ADXR, ALMA, APO, ATR, AccelerationBands, AcceleratorOscillator, AdaptiveCycle, Alligator, Alpha, AnchoredVWAP, Aroon, AroonOscillator, AtrBands, AtrTrailingStop, Autocorrelation, AverageDrawdown, AwesomeOscillator, AwesomeOscillatorHistogram, BalanceOfPower, Beta, BollingerBands, BollingerBandwidth, CCI, CFO, CMO, CalmarRatio, Camarilla, CenterOfGravity, ChaikinMoneyFlow, ChaikinOscillator, ChaikinVolatility, ChandeKrollStop, ChandelierExit, ChoppinessIndex, ClassicPivots, CoefficientOfVariation, ConditionalValueAtRisk, ConnorsRSI, Coppock, CyberneticCycle, DEMA, DPO, Decycler, DecyclerOscillator, DemandIndex, DemarkPivots, DetrendedStdDev, Doji, Donchian, DonchianStop, DoubleBollinger, DrawdownDuration, EMA, EVWMA, EaseOfMovement, EhlersStochastic, ElderImpulse, EmpiricalModeDecomposition, Engulfing, FAMA, FRAMA, FibonacciPivots, FisherTransform, ForceIndex, FractalChaosBands, GainLossRatio, GarmanKlassVolatility, HMA, Hammer, HangingMan, Harami, HeikinAshi, HiLoActivator, HilbertDominantCycle, HistoricalVolatility, HurstChannel, HurstExponent, Ichimoku, Inertia, InformationRatio, InitialBalance, InstantaneousTrendline, InverseFisherTransform, InvertedHammer, JMA, KAMA, KST, KVO, KellyCriterion, Keltner, Kurtosis, LaguerreRSI, LinRegAngle, LinRegChannel, LinRegSlope, LinearRegression, MACD, MAMA, MFI, MOM, MaEnvelope, MarketFacilitationIndex, Marubozu, MassIndex, MaxDrawdown, McGinleyDynamic, MedianAbsoluteDeviation, MedianPrice, MorningEveningStar, NATR, NVI, OBV, OmegaRatio, OpeningRange, PGO, PMO, PPO, PSAR, PVI, PainIndex, ParkinsonVolatility, PearsonCorrelation, PercentB, PercentageTrailingStop, PiercingDarkCloud, ProfitFactor, ROC, RSI, RSquared, RVI, RVIVolatility, RWI, RecoveryFactor, RenkoTrailingStop, RogersSatchellVolatility, RollingVWAP, RoofingFilter, SMA, SMI, SMMA, STC, SharpeRatio, ShootingStar, SineWave, Skewness, SortinoRatio, SpearmanCorrelation, SpinningTop, StandardError, StandardErrorBands, StarcBands, StdDev, StepTrailingStop, StochRSI, Stochastic, SuperSmoother, SuperTrend, T3, TDCombo, TDCountdown, TDDeMarker, TDDifferential, TDLines, TDOpen, TDPressure, TDREI, TDRangeProjection, TDRiskLevel, TDSequential, TDSetup, TEMA, TII, TRIMA, TRIX, TSI, TSV, ThreeInside, ThreeOutside, ThreeSoldiersOrCrows, TreynorRatio, TrueRange, TtmSqueeze, Tweezer, TypicalPrice, UlcerIndex, UltimateOscillator, VIDYA, VWAP, VWMA, VZO, ValueArea, ValueAtRisk, Variance, VerticalHorizontalFilter, VoltyStop, VolumeOscillator, VolumePriceTrend, Vortex, VwapStdDevBands, WMA, WaveTrend, WeightedClose, WilliamsAD, WilliamsFractals, WilliamsR, WoodiePivots, YangZhangVolatility, YoyoExit, ZLEMA, ZScore, ZeroLagMACD, ZigZag, installPanicHook, version
|
|
8
|
+
ADL, ADX, ADXR, ALMA, APO, ATR, AccelerationBands, AcceleratorOscillator, AdaptiveCycle, Alligator, Alpha, AnchoredVWAP, Aroon, AroonOscillator, AtrBands, AtrTrailingStop, Autocorrelation, AverageDrawdown, AwesomeOscillator, AwesomeOscillatorHistogram, BalanceOfPower, Beta, BollingerBands, BollingerBandwidth, CCI, CFO, CMO, CalmarRatio, Camarilla, CenterOfGravity, ChaikinMoneyFlow, ChaikinOscillator, ChaikinVolatility, ChandeKrollStop, ChandelierExit, ChoppinessIndex, ClassicPivots, CoefficientOfVariation, Cointegration, ConditionalValueAtRisk, ConnorsRSI, Coppock, CyberneticCycle, DEMA, DPO, Decycler, DecyclerOscillator, DemandIndex, DemarkPivots, DetrendedStdDev, Doji, Donchian, DonchianStop, DoubleBollinger, DrawdownDuration, EMA, EVWMA, EaseOfMovement, EhlersStochastic, ElderImpulse, EmpiricalModeDecomposition, Engulfing, FAMA, FRAMA, FibonacciPivots, FisherTransform, ForceIndex, FractalChaosBands, GainLossRatio, GarmanKlassVolatility, HMA, Hammer, HangingMan, Harami, HeikinAshi, HiLoActivator, HilbertDominantCycle, HistoricalVolatility, HurstChannel, HurstExponent, Ichimoku, Inertia, InformationRatio, InitialBalance, InstantaneousTrendline, InverseFisherTransform, InvertedHammer, JMA, KAMA, KST, KVO, KellyCriterion, Keltner, Kurtosis, LaguerreRSI, LeadLagCrossCorrelation, LinRegAngle, LinRegChannel, LinRegSlope, LinearRegression, MACD, MAMA, MFI, MOM, MaEnvelope, MarketFacilitationIndex, Marubozu, MassIndex, MaxDrawdown, McGinleyDynamic, MedianAbsoluteDeviation, MedianPrice, MorningEveningStar, NATR, NVI, OBV, OmegaRatio, OpeningRange, PGO, PMO, PPO, PSAR, PVI, PainIndex, PairSpreadZScore, PairwiseBeta, ParkinsonVolatility, PearsonCorrelation, PercentB, PercentageTrailingStop, PiercingDarkCloud, ProfitFactor, ROC, RSI, RSquared, RVI, RVIVolatility, RWI, RecoveryFactor, RelativeStrengthAB, RenkoTrailingStop, RogersSatchellVolatility, RollingVWAP, RoofingFilter, SMA, SMI, SMMA, STC, SharpeRatio, ShootingStar, SineWave, Skewness, SortinoRatio, SpearmanCorrelation, SpinningTop, StandardError, StandardErrorBands, StarcBands, StdDev, StepTrailingStop, StochRSI, Stochastic, SuperSmoother, SuperTrend, T3, TDCombo, TDCountdown, TDDeMarker, TDDifferential, TDLines, TDOpen, TDPressure, TDREI, TDRangeProjection, TDRiskLevel, TDSequential, TDSetup, TEMA, TII, TRIMA, TRIX, TSI, TSV, ThreeInside, ThreeOutside, ThreeSoldiersOrCrows, TreynorRatio, TrueRange, TtmSqueeze, Tweezer, TypicalPrice, UlcerIndex, UltimateOscillator, VIDYA, VWAP, VWMA, VZO, ValueArea, ValueAtRisk, Variance, VerticalHorizontalFilter, VoltyStop, VolumeOscillator, VolumePriceTrend, Vortex, VwapStdDevBands, WMA, WaveTrend, WeightedClose, WilliamsAD, WilliamsFractals, WilliamsR, WoodiePivots, YangZhangVolatility, YoyoExit, ZLEMA, ZScore, ZeroLagMACD, ZigZag, installPanicHook, version
|
|
9
9
|
} from "./wickra_wasm_bg.js";
|
package/wickra_wasm_bg.js
CHANGED
|
@@ -3227,6 +3227,94 @@ export class CoefficientOfVariation {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
if (Symbol.dispose) CoefficientOfVariation.prototype[Symbol.dispose] = CoefficientOfVariation.prototype.free;
|
|
3229
3229
|
|
|
3230
|
+
export class Cointegration {
|
|
3231
|
+
__destroy_into_raw() {
|
|
3232
|
+
const ptr = this.__wbg_ptr;
|
|
3233
|
+
this.__wbg_ptr = 0;
|
|
3234
|
+
CointegrationFinalization.unregister(this);
|
|
3235
|
+
return ptr;
|
|
3236
|
+
}
|
|
3237
|
+
free() {
|
|
3238
|
+
const ptr = this.__destroy_into_raw();
|
|
3239
|
+
wasm.__wbg_cointegration_free(ptr, 0);
|
|
3240
|
+
}
|
|
3241
|
+
/**
|
|
3242
|
+
* Flat `Float64Array` of length `3 * n`:
|
|
3243
|
+
* `[hedgeRatio0, spread0, adfStat0, hedgeRatio1, ...]`. Warmup rows are NaN.
|
|
3244
|
+
* @param {Float64Array} a
|
|
3245
|
+
* @param {Float64Array} b
|
|
3246
|
+
* @returns {Float64Array}
|
|
3247
|
+
*/
|
|
3248
|
+
batch(a, b) {
|
|
3249
|
+
try {
|
|
3250
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3251
|
+
const ptr0 = passArrayF64ToWasm0(a, wasm.__wbindgen_export3);
|
|
3252
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3253
|
+
const ptr1 = passArrayF64ToWasm0(b, wasm.__wbindgen_export3);
|
|
3254
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3255
|
+
wasm.cointegration_batch(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
3256
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3257
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3258
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3259
|
+
if (r2) {
|
|
3260
|
+
throw takeObject(r1);
|
|
3261
|
+
}
|
|
3262
|
+
return takeObject(r0);
|
|
3263
|
+
} finally {
|
|
3264
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
/**
|
|
3268
|
+
* @returns {boolean}
|
|
3269
|
+
*/
|
|
3270
|
+
isReady() {
|
|
3271
|
+
const ret = wasm.cointegration_isReady(this.__wbg_ptr);
|
|
3272
|
+
return ret !== 0;
|
|
3273
|
+
}
|
|
3274
|
+
/**
|
|
3275
|
+
* @param {number} period
|
|
3276
|
+
* @param {number} adf_lags
|
|
3277
|
+
*/
|
|
3278
|
+
constructor(period, adf_lags) {
|
|
3279
|
+
try {
|
|
3280
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3281
|
+
wasm.cointegration_new(retptr, period, adf_lags);
|
|
3282
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3283
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3284
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3285
|
+
if (r2) {
|
|
3286
|
+
throw takeObject(r1);
|
|
3287
|
+
}
|
|
3288
|
+
this.__wbg_ptr = r0;
|
|
3289
|
+
CointegrationFinalization.register(this, this.__wbg_ptr, this);
|
|
3290
|
+
return this;
|
|
3291
|
+
} finally {
|
|
3292
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
reset() {
|
|
3296
|
+
wasm.cointegration_reset(this.__wbg_ptr);
|
|
3297
|
+
}
|
|
3298
|
+
/**
|
|
3299
|
+
* Returns `{ hedgeRatio, spread, adfStat }`, or `null` during warmup.
|
|
3300
|
+
* @param {number} a
|
|
3301
|
+
* @param {number} b
|
|
3302
|
+
* @returns {any}
|
|
3303
|
+
*/
|
|
3304
|
+
update(a, b) {
|
|
3305
|
+
const ret = wasm.cointegration_update(this.__wbg_ptr, a, b);
|
|
3306
|
+
return takeObject(ret);
|
|
3307
|
+
}
|
|
3308
|
+
/**
|
|
3309
|
+
* @returns {number}
|
|
3310
|
+
*/
|
|
3311
|
+
warmupPeriod() {
|
|
3312
|
+
const ret = wasm.cointegration_warmupPeriod(this.__wbg_ptr);
|
|
3313
|
+
return ret >>> 0;
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
if (Symbol.dispose) Cointegration.prototype[Symbol.dispose] = Cointegration.prototype.free;
|
|
3317
|
+
|
|
3230
3318
|
export class ConditionalValueAtRisk {
|
|
3231
3319
|
__destroy_into_raw() {
|
|
3232
3320
|
const ptr = this.__wbg_ptr;
|
|
@@ -7887,6 +7975,95 @@ export class LaguerreRSI {
|
|
|
7887
7975
|
}
|
|
7888
7976
|
if (Symbol.dispose) LaguerreRSI.prototype[Symbol.dispose] = LaguerreRSI.prototype.free;
|
|
7889
7977
|
|
|
7978
|
+
export class LeadLagCrossCorrelation {
|
|
7979
|
+
__destroy_into_raw() {
|
|
7980
|
+
const ptr = this.__wbg_ptr;
|
|
7981
|
+
this.__wbg_ptr = 0;
|
|
7982
|
+
LeadLagCrossCorrelationFinalization.unregister(this);
|
|
7983
|
+
return ptr;
|
|
7984
|
+
}
|
|
7985
|
+
free() {
|
|
7986
|
+
const ptr = this.__destroy_into_raw();
|
|
7987
|
+
wasm.__wbg_leadlagcrosscorrelation_free(ptr, 0);
|
|
7988
|
+
}
|
|
7989
|
+
/**
|
|
7990
|
+
* Flat `Float64Array` of length `2 * n`: `[lag0, corr0, lag1, corr1, ...]`.
|
|
7991
|
+
* Warmup positions are NaN.
|
|
7992
|
+
* @param {Float64Array} a
|
|
7993
|
+
* @param {Float64Array} b
|
|
7994
|
+
* @returns {Float64Array}
|
|
7995
|
+
*/
|
|
7996
|
+
batch(a, b) {
|
|
7997
|
+
try {
|
|
7998
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
7999
|
+
const ptr0 = passArrayF64ToWasm0(a, wasm.__wbindgen_export3);
|
|
8000
|
+
const len0 = WASM_VECTOR_LEN;
|
|
8001
|
+
const ptr1 = passArrayF64ToWasm0(b, wasm.__wbindgen_export3);
|
|
8002
|
+
const len1 = WASM_VECTOR_LEN;
|
|
8003
|
+
wasm.leadlagcrosscorrelation_batch(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
8004
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
8005
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
8006
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
8007
|
+
if (r2) {
|
|
8008
|
+
throw takeObject(r1);
|
|
8009
|
+
}
|
|
8010
|
+
return takeObject(r0);
|
|
8011
|
+
} finally {
|
|
8012
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
8013
|
+
}
|
|
8014
|
+
}
|
|
8015
|
+
/**
|
|
8016
|
+
* @returns {boolean}
|
|
8017
|
+
*/
|
|
8018
|
+
isReady() {
|
|
8019
|
+
const ret = wasm.leadlagcrosscorrelation_isReady(this.__wbg_ptr);
|
|
8020
|
+
return ret !== 0;
|
|
8021
|
+
}
|
|
8022
|
+
/**
|
|
8023
|
+
* @param {number} window
|
|
8024
|
+
* @param {number} max_lag
|
|
8025
|
+
*/
|
|
8026
|
+
constructor(window, max_lag) {
|
|
8027
|
+
try {
|
|
8028
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
8029
|
+
wasm.leadlagcrosscorrelation_new(retptr, window, max_lag);
|
|
8030
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
8031
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
8032
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
8033
|
+
if (r2) {
|
|
8034
|
+
throw takeObject(r1);
|
|
8035
|
+
}
|
|
8036
|
+
this.__wbg_ptr = r0;
|
|
8037
|
+
LeadLagCrossCorrelationFinalization.register(this, this.__wbg_ptr, this);
|
|
8038
|
+
return this;
|
|
8039
|
+
} finally {
|
|
8040
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
8041
|
+
}
|
|
8042
|
+
}
|
|
8043
|
+
reset() {
|
|
8044
|
+
wasm.leadlagcrosscorrelation_reset(this.__wbg_ptr);
|
|
8045
|
+
}
|
|
8046
|
+
/**
|
|
8047
|
+
* Returns `{ lag, correlation }`, or `null` during warmup. Positive lag
|
|
8048
|
+
* means `a` leads `b`.
|
|
8049
|
+
* @param {number} a
|
|
8050
|
+
* @param {number} b
|
|
8051
|
+
* @returns {any}
|
|
8052
|
+
*/
|
|
8053
|
+
update(a, b) {
|
|
8054
|
+
const ret = wasm.leadlagcrosscorrelation_update(this.__wbg_ptr, a, b);
|
|
8055
|
+
return takeObject(ret);
|
|
8056
|
+
}
|
|
8057
|
+
/**
|
|
8058
|
+
* @returns {number}
|
|
8059
|
+
*/
|
|
8060
|
+
warmupPeriod() {
|
|
8061
|
+
const ret = wasm.leadlagcrosscorrelation_warmupPeriod(this.__wbg_ptr);
|
|
8062
|
+
return ret >>> 0;
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
if (Symbol.dispose) LeadLagCrossCorrelation.prototype[Symbol.dispose] = LeadLagCrossCorrelation.prototype.free;
|
|
8066
|
+
|
|
7890
8067
|
export class LinRegAngle {
|
|
7891
8068
|
__destroy_into_raw() {
|
|
7892
8069
|
const ptr = this.__wbg_ptr;
|
|
@@ -10130,6 +10307,193 @@ export class PainIndex {
|
|
|
10130
10307
|
}
|
|
10131
10308
|
if (Symbol.dispose) PainIndex.prototype[Symbol.dispose] = PainIndex.prototype.free;
|
|
10132
10309
|
|
|
10310
|
+
export class PairSpreadZScore {
|
|
10311
|
+
__destroy_into_raw() {
|
|
10312
|
+
const ptr = this.__wbg_ptr;
|
|
10313
|
+
this.__wbg_ptr = 0;
|
|
10314
|
+
PairSpreadZScoreFinalization.unregister(this);
|
|
10315
|
+
return ptr;
|
|
10316
|
+
}
|
|
10317
|
+
free() {
|
|
10318
|
+
const ptr = this.__destroy_into_raw();
|
|
10319
|
+
wasm.__wbg_pairspreadzscore_free(ptr, 0);
|
|
10320
|
+
}
|
|
10321
|
+
/**
|
|
10322
|
+
* Batch over two equally-sized arrays of prices. Returns one `f64` per
|
|
10323
|
+
* input position (`NaN` during warmup).
|
|
10324
|
+
* @param {Float64Array} a
|
|
10325
|
+
* @param {Float64Array} b
|
|
10326
|
+
* @returns {Float64Array}
|
|
10327
|
+
*/
|
|
10328
|
+
batch(a, b) {
|
|
10329
|
+
try {
|
|
10330
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10331
|
+
const ptr0 = passArrayF64ToWasm0(a, wasm.__wbindgen_export3);
|
|
10332
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10333
|
+
const ptr1 = passArrayF64ToWasm0(b, wasm.__wbindgen_export3);
|
|
10334
|
+
const len1 = WASM_VECTOR_LEN;
|
|
10335
|
+
wasm.pairspreadzscore_batch(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
10336
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10337
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10338
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
10339
|
+
if (r2) {
|
|
10340
|
+
throw takeObject(r1);
|
|
10341
|
+
}
|
|
10342
|
+
return takeObject(r0);
|
|
10343
|
+
} finally {
|
|
10344
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10345
|
+
}
|
|
10346
|
+
}
|
|
10347
|
+
/**
|
|
10348
|
+
* @returns {boolean}
|
|
10349
|
+
*/
|
|
10350
|
+
isReady() {
|
|
10351
|
+
const ret = wasm.pairspreadzscore_isReady(this.__wbg_ptr);
|
|
10352
|
+
return ret !== 0;
|
|
10353
|
+
}
|
|
10354
|
+
/**
|
|
10355
|
+
* @param {number} beta_period
|
|
10356
|
+
* @param {number} z_period
|
|
10357
|
+
*/
|
|
10358
|
+
constructor(beta_period, z_period) {
|
|
10359
|
+
try {
|
|
10360
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10361
|
+
wasm.pairspreadzscore_new(retptr, beta_period, z_period);
|
|
10362
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10363
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10364
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
10365
|
+
if (r2) {
|
|
10366
|
+
throw takeObject(r1);
|
|
10367
|
+
}
|
|
10368
|
+
this.__wbg_ptr = r0;
|
|
10369
|
+
PairSpreadZScoreFinalization.register(this, this.__wbg_ptr, this);
|
|
10370
|
+
return this;
|
|
10371
|
+
} finally {
|
|
10372
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10373
|
+
}
|
|
10374
|
+
}
|
|
10375
|
+
reset() {
|
|
10376
|
+
wasm.pairspreadzscore_reset(this.__wbg_ptr);
|
|
10377
|
+
}
|
|
10378
|
+
/**
|
|
10379
|
+
* @param {number} a
|
|
10380
|
+
* @param {number} b
|
|
10381
|
+
* @returns {number | undefined}
|
|
10382
|
+
*/
|
|
10383
|
+
update(a, b) {
|
|
10384
|
+
try {
|
|
10385
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10386
|
+
wasm.pairspreadzscore_update(retptr, this.__wbg_ptr, a, b);
|
|
10387
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10388
|
+
var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
|
|
10389
|
+
return r0 === 0 ? undefined : r2;
|
|
10390
|
+
} finally {
|
|
10391
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10392
|
+
}
|
|
10393
|
+
}
|
|
10394
|
+
/**
|
|
10395
|
+
* @returns {number}
|
|
10396
|
+
*/
|
|
10397
|
+
warmupPeriod() {
|
|
10398
|
+
const ret = wasm.pairspreadzscore_warmupPeriod(this.__wbg_ptr);
|
|
10399
|
+
return ret >>> 0;
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10402
|
+
if (Symbol.dispose) PairSpreadZScore.prototype[Symbol.dispose] = PairSpreadZScore.prototype.free;
|
|
10403
|
+
|
|
10404
|
+
export class PairwiseBeta {
|
|
10405
|
+
__destroy_into_raw() {
|
|
10406
|
+
const ptr = this.__wbg_ptr;
|
|
10407
|
+
this.__wbg_ptr = 0;
|
|
10408
|
+
PairwiseBetaFinalization.unregister(this);
|
|
10409
|
+
return ptr;
|
|
10410
|
+
}
|
|
10411
|
+
free() {
|
|
10412
|
+
const ptr = this.__destroy_into_raw();
|
|
10413
|
+
wasm.__wbg_pairwisebeta_free(ptr, 0);
|
|
10414
|
+
}
|
|
10415
|
+
/**
|
|
10416
|
+
* Batch over two equally-sized arrays. Returns one `f64` per
|
|
10417
|
+
* input position (`NaN` during warmup).
|
|
10418
|
+
* @param {Float64Array} x
|
|
10419
|
+
* @param {Float64Array} y
|
|
10420
|
+
* @returns {Float64Array}
|
|
10421
|
+
*/
|
|
10422
|
+
batch(x, y) {
|
|
10423
|
+
try {
|
|
10424
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10425
|
+
const ptr0 = passArrayF64ToWasm0(x, wasm.__wbindgen_export3);
|
|
10426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
10427
|
+
const ptr1 = passArrayF64ToWasm0(y, wasm.__wbindgen_export3);
|
|
10428
|
+
const len1 = WASM_VECTOR_LEN;
|
|
10429
|
+
wasm.pairwisebeta_batch(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
10430
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10431
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10432
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
10433
|
+
if (r2) {
|
|
10434
|
+
throw takeObject(r1);
|
|
10435
|
+
}
|
|
10436
|
+
return takeObject(r0);
|
|
10437
|
+
} finally {
|
|
10438
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10439
|
+
}
|
|
10440
|
+
}
|
|
10441
|
+
/**
|
|
10442
|
+
* @returns {boolean}
|
|
10443
|
+
*/
|
|
10444
|
+
isReady() {
|
|
10445
|
+
const ret = wasm.pairwisebeta_isReady(this.__wbg_ptr);
|
|
10446
|
+
return ret !== 0;
|
|
10447
|
+
}
|
|
10448
|
+
/**
|
|
10449
|
+
* @param {number} period
|
|
10450
|
+
*/
|
|
10451
|
+
constructor(period) {
|
|
10452
|
+
try {
|
|
10453
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10454
|
+
wasm.pairwisebeta_new(retptr, period);
|
|
10455
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10456
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
10457
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
10458
|
+
if (r2) {
|
|
10459
|
+
throw takeObject(r1);
|
|
10460
|
+
}
|
|
10461
|
+
this.__wbg_ptr = r0;
|
|
10462
|
+
PairwiseBetaFinalization.register(this, this.__wbg_ptr, this);
|
|
10463
|
+
return this;
|
|
10464
|
+
} finally {
|
|
10465
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10466
|
+
}
|
|
10467
|
+
}
|
|
10468
|
+
reset() {
|
|
10469
|
+
wasm.pairwisebeta_reset(this.__wbg_ptr);
|
|
10470
|
+
}
|
|
10471
|
+
/**
|
|
10472
|
+
* @param {number} x
|
|
10473
|
+
* @param {number} y
|
|
10474
|
+
* @returns {number | undefined}
|
|
10475
|
+
*/
|
|
10476
|
+
update(x, y) {
|
|
10477
|
+
try {
|
|
10478
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10479
|
+
wasm.pairwisebeta_update(retptr, this.__wbg_ptr, x, y);
|
|
10480
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
10481
|
+
var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
|
|
10482
|
+
return r0 === 0 ? undefined : r2;
|
|
10483
|
+
} finally {
|
|
10484
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
10485
|
+
}
|
|
10486
|
+
}
|
|
10487
|
+
/**
|
|
10488
|
+
* @returns {number}
|
|
10489
|
+
*/
|
|
10490
|
+
warmupPeriod() {
|
|
10491
|
+
const ret = wasm.pairwisebeta_warmupPeriod(this.__wbg_ptr);
|
|
10492
|
+
return ret >>> 0;
|
|
10493
|
+
}
|
|
10494
|
+
}
|
|
10495
|
+
if (Symbol.dispose) PairwiseBeta.prototype[Symbol.dispose] = PairwiseBeta.prototype.free;
|
|
10496
|
+
|
|
10133
10497
|
export class ParkinsonVolatility {
|
|
10134
10498
|
__destroy_into_raw() {
|
|
10135
10499
|
const ptr = this.__wbg_ptr;
|
|
@@ -11181,6 +11545,94 @@ export class RecoveryFactor {
|
|
|
11181
11545
|
}
|
|
11182
11546
|
if (Symbol.dispose) RecoveryFactor.prototype[Symbol.dispose] = RecoveryFactor.prototype.free;
|
|
11183
11547
|
|
|
11548
|
+
export class RelativeStrengthAB {
|
|
11549
|
+
__destroy_into_raw() {
|
|
11550
|
+
const ptr = this.__wbg_ptr;
|
|
11551
|
+
this.__wbg_ptr = 0;
|
|
11552
|
+
RelativeStrengthABFinalization.unregister(this);
|
|
11553
|
+
return ptr;
|
|
11554
|
+
}
|
|
11555
|
+
free() {
|
|
11556
|
+
const ptr = this.__destroy_into_raw();
|
|
11557
|
+
wasm.__wbg_relativestrengthab_free(ptr, 0);
|
|
11558
|
+
}
|
|
11559
|
+
/**
|
|
11560
|
+
* Flat `Float64Array` of length `3 * n`:
|
|
11561
|
+
* `[ratio0, ratioMa0, ratioRsi0, ratio1, ...]`. Warmup rows are NaN.
|
|
11562
|
+
* @param {Float64Array} a
|
|
11563
|
+
* @param {Float64Array} b
|
|
11564
|
+
* @returns {Float64Array}
|
|
11565
|
+
*/
|
|
11566
|
+
batch(a, b) {
|
|
11567
|
+
try {
|
|
11568
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
11569
|
+
const ptr0 = passArrayF64ToWasm0(a, wasm.__wbindgen_export3);
|
|
11570
|
+
const len0 = WASM_VECTOR_LEN;
|
|
11571
|
+
const ptr1 = passArrayF64ToWasm0(b, wasm.__wbindgen_export3);
|
|
11572
|
+
const len1 = WASM_VECTOR_LEN;
|
|
11573
|
+
wasm.relativestrengthab_batch(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
11574
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
11575
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
11576
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
11577
|
+
if (r2) {
|
|
11578
|
+
throw takeObject(r1);
|
|
11579
|
+
}
|
|
11580
|
+
return takeObject(r0);
|
|
11581
|
+
} finally {
|
|
11582
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
11583
|
+
}
|
|
11584
|
+
}
|
|
11585
|
+
/**
|
|
11586
|
+
* @returns {boolean}
|
|
11587
|
+
*/
|
|
11588
|
+
isReady() {
|
|
11589
|
+
const ret = wasm.relativestrengthab_isReady(this.__wbg_ptr);
|
|
11590
|
+
return ret !== 0;
|
|
11591
|
+
}
|
|
11592
|
+
/**
|
|
11593
|
+
* @param {number} ma_period
|
|
11594
|
+
* @param {number} rsi_period
|
|
11595
|
+
*/
|
|
11596
|
+
constructor(ma_period, rsi_period) {
|
|
11597
|
+
try {
|
|
11598
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
11599
|
+
wasm.relativestrengthab_new(retptr, ma_period, rsi_period);
|
|
11600
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
11601
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
11602
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
11603
|
+
if (r2) {
|
|
11604
|
+
throw takeObject(r1);
|
|
11605
|
+
}
|
|
11606
|
+
this.__wbg_ptr = r0;
|
|
11607
|
+
RelativeStrengthABFinalization.register(this, this.__wbg_ptr, this);
|
|
11608
|
+
return this;
|
|
11609
|
+
} finally {
|
|
11610
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
11611
|
+
}
|
|
11612
|
+
}
|
|
11613
|
+
reset() {
|
|
11614
|
+
wasm.relativestrengthab_reset(this.__wbg_ptr);
|
|
11615
|
+
}
|
|
11616
|
+
/**
|
|
11617
|
+
* Returns `{ ratio, ratioMa, ratioRsi }`, or `null` during warmup.
|
|
11618
|
+
* @param {number} a
|
|
11619
|
+
* @param {number} b
|
|
11620
|
+
* @returns {any}
|
|
11621
|
+
*/
|
|
11622
|
+
update(a, b) {
|
|
11623
|
+
const ret = wasm.relativestrengthab_update(this.__wbg_ptr, a, b);
|
|
11624
|
+
return takeObject(ret);
|
|
11625
|
+
}
|
|
11626
|
+
/**
|
|
11627
|
+
* @returns {number}
|
|
11628
|
+
*/
|
|
11629
|
+
warmupPeriod() {
|
|
11630
|
+
const ret = wasm.relativestrengthab_warmupPeriod(this.__wbg_ptr);
|
|
11631
|
+
return ret >>> 0;
|
|
11632
|
+
}
|
|
11633
|
+
}
|
|
11634
|
+
if (Symbol.dispose) RelativeStrengthAB.prototype[Symbol.dispose] = RelativeStrengthAB.prototype.free;
|
|
11635
|
+
|
|
11184
11636
|
export class RenkoTrailingStop {
|
|
11185
11637
|
__destroy_into_raw() {
|
|
11186
11638
|
const ptr = this.__wbg_ptr;
|
|
@@ -18166,6 +18618,9 @@ const CMOFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
18166
18618
|
const CoefficientOfVariationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18167
18619
|
? { register: () => {}, unregister: () => {} }
|
|
18168
18620
|
: new FinalizationRegistry(ptr => wasm.__wbg_coefficientofvariation_free(ptr, 1));
|
|
18621
|
+
const CointegrationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18622
|
+
? { register: () => {}, unregister: () => {} }
|
|
18623
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cointegration_free(ptr, 1));
|
|
18169
18624
|
const ConditionalValueAtRiskFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18170
18625
|
? { register: () => {}, unregister: () => {} }
|
|
18171
18626
|
: new FinalizationRegistry(ptr => wasm.__wbg_conditionalvalueatrisk_free(ptr, 1));
|
|
@@ -18334,6 +18789,9 @@ const KVOFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
18334
18789
|
const LaguerreRSIFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18335
18790
|
? { register: () => {}, unregister: () => {} }
|
|
18336
18791
|
: new FinalizationRegistry(ptr => wasm.__wbg_laguerrersi_free(ptr, 1));
|
|
18792
|
+
const LeadLagCrossCorrelationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18793
|
+
? { register: () => {}, unregister: () => {} }
|
|
18794
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_leadlagcrosscorrelation_free(ptr, 1));
|
|
18337
18795
|
const LinRegAngleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18338
18796
|
? { register: () => {}, unregister: () => {} }
|
|
18339
18797
|
: new FinalizationRegistry(ptr => wasm.__wbg_linregangle_free(ptr, 1));
|
|
@@ -18403,6 +18861,12 @@ const OpeningRangeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
18403
18861
|
const PainIndexFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18404
18862
|
? { register: () => {}, unregister: () => {} }
|
|
18405
18863
|
: new FinalizationRegistry(ptr => wasm.__wbg_painindex_free(ptr, 1));
|
|
18864
|
+
const PairSpreadZScoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18865
|
+
? { register: () => {}, unregister: () => {} }
|
|
18866
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_pairspreadzscore_free(ptr, 1));
|
|
18867
|
+
const PairwiseBetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18868
|
+
? { register: () => {}, unregister: () => {} }
|
|
18869
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_pairwisebeta_free(ptr, 1));
|
|
18406
18870
|
const ParkinsonVolatilityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18407
18871
|
? { register: () => {}, unregister: () => {} }
|
|
18408
18872
|
: new FinalizationRegistry(ptr => wasm.__wbg_parkinsonvolatility_free(ptr, 1));
|
|
@@ -18442,6 +18906,9 @@ const RSquaredFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
18442
18906
|
const RecoveryFactorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18443
18907
|
? { register: () => {}, unregister: () => {} }
|
|
18444
18908
|
: new FinalizationRegistry(ptr => wasm.__wbg_recoveryfactor_free(ptr, 1));
|
|
18909
|
+
const RelativeStrengthABFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18910
|
+
? { register: () => {}, unregister: () => {} }
|
|
18911
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_relativestrengthab_free(ptr, 1));
|
|
18445
18912
|
const RenkoTrailingStopFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
18446
18913
|
? { register: () => {}, unregister: () => {} }
|
|
18447
18914
|
: new FinalizationRegistry(ptr => wasm.__wbg_renkotrailingstop_free(ptr, 1));
|
package/wickra_wasm_bg.wasm
CHANGED
|
Binary file
|