@vulcan-js/indicators 0.1.0-beta.3 → 0.2.0
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/dist/index.d.ts +20 -20
- package/dist/index.js +499 -396
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ declare const cci: _vulcan_js_core0.SignalGenerator<{
|
|
|
80
80
|
h: dnum.Numberish;
|
|
81
81
|
l: dnum.Numberish;
|
|
82
82
|
c: dnum.Numberish;
|
|
83
|
-
}, Dnum, CommodityChannelIndexOptions>;
|
|
83
|
+
}, dnum.Dnum, CommodityChannelIndexOptions>;
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/momentum/percentagePriceOscillator.d.ts
|
|
86
86
|
interface PercentagePriceOscillatorOptions {
|
|
@@ -183,7 +183,7 @@ declare const defaultPriceRateOfChangeOptions: PriceRateOfChangeOptions;
|
|
|
183
183
|
* @param options.period - Number of periods to look back (default: 12)
|
|
184
184
|
* @returns Generator yielding ROC values as Dnum
|
|
185
185
|
*/
|
|
186
|
-
declare const roc: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, PriceRateOfChangeOptions>;
|
|
186
|
+
declare const roc: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, PriceRateOfChangeOptions>;
|
|
187
187
|
//#endregion
|
|
188
188
|
//#region src/momentum/randomIndex.d.ts
|
|
189
189
|
interface RandomIndexOptions {
|
|
@@ -217,9 +217,9 @@ interface KDJPoint {
|
|
|
217
217
|
* initial K and D values set to 50.
|
|
218
218
|
*
|
|
219
219
|
* Formula:
|
|
220
|
-
* RSV = (Close - LowestLow(period)) / (HighestHigh(period) - LowestLow(period))
|
|
221
|
-
* K = ((kPeriod - 1) / kPeriod)
|
|
222
|
-
* D = ((dPeriod - 1) / dPeriod)
|
|
220
|
+
* RSV = (Close - LowestLow(period)) / (HighestHigh(period) - LowestLow(period)) * 100
|
|
221
|
+
* K = ((kPeriod - 1) / kPeriod) * prevK + (1 / kPeriod) * RSV
|
|
222
|
+
* D = ((dPeriod - 1) / dPeriod) * prevD + (1 / dPeriod) * K
|
|
223
223
|
* J = 3K - 2D
|
|
224
224
|
*
|
|
225
225
|
* Interpretation:
|
|
@@ -258,7 +258,7 @@ declare const defaultRSIOptions: RSIOptions;
|
|
|
258
258
|
*
|
|
259
259
|
* RSI = 100 - (100 / (1 + RS))
|
|
260
260
|
*/
|
|
261
|
-
declare const rsi: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, RSIOptions>;
|
|
261
|
+
declare const rsi: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, RSIOptions>;
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region src/momentum/stochasticOscillator.d.ts
|
|
264
264
|
interface StochasticOscillatorOptions {
|
|
@@ -303,7 +303,7 @@ declare const defaultWilliamsROptions: WilliamsROptions;
|
|
|
303
303
|
* over a specified period.
|
|
304
304
|
*
|
|
305
305
|
* Formula:
|
|
306
|
-
* - %R = -100
|
|
306
|
+
* - %R = -100 * (Highest High - Close) / (Highest High - Lowest Low)
|
|
307
307
|
*
|
|
308
308
|
* Range: -100 to 0
|
|
309
309
|
* - Above -20: Overbought
|
|
@@ -378,7 +378,7 @@ declare const defaultCFOOptions: ChandeForecastOscillatorOptions;
|
|
|
378
378
|
* @param options.period - The period for linear regression (default: 14)
|
|
379
379
|
* @returns Generator yielding CFO values as percentages
|
|
380
380
|
*/
|
|
381
|
-
declare const cfo: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, ChandeForecastOscillatorOptions>;
|
|
381
|
+
declare const cfo: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, ChandeForecastOscillatorOptions>;
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/trend/doubleExponentialMovingAverage.d.ts
|
|
384
384
|
interface DoubleExponentialMovingAverageOptions {
|
|
@@ -409,7 +409,7 @@ declare const defaultExponentialMovingAverageOptions: ExponentialMovingAverageOp
|
|
|
409
409
|
* EMA = Price * k + PrevEMA * (1 - k)
|
|
410
410
|
* Where k = 2 / (period + 1)
|
|
411
411
|
*/
|
|
412
|
-
declare const ema: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, ExponentialMovingAverageOptions>;
|
|
412
|
+
declare const ema: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, ExponentialMovingAverageOptions>;
|
|
413
413
|
//#endregion
|
|
414
414
|
//#region src/trend/ichimokuCloud.d.ts
|
|
415
415
|
interface IchimokuCloudOptions {
|
|
@@ -503,7 +503,7 @@ declare const defaultMovingMaxOptions: MovingMaxOptions;
|
|
|
503
503
|
/**
|
|
504
504
|
* Moving Maximum (MovingMax)
|
|
505
505
|
*/
|
|
506
|
-
declare const mmax: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, MovingMaxOptions>;
|
|
506
|
+
declare const mmax: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, MovingMaxOptions>;
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region src/trend/movingMin.d.ts
|
|
509
509
|
interface MovingMinOptions {
|
|
@@ -516,7 +516,7 @@ declare const defaultMovingMinOptions: MovingMinOptions;
|
|
|
516
516
|
/**
|
|
517
517
|
* Moving Minimum (MovingMin)
|
|
518
518
|
*/
|
|
519
|
-
declare const mmin: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, MovingMinOptions>;
|
|
519
|
+
declare const mmin: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, MovingMinOptions>;
|
|
520
520
|
//#endregion
|
|
521
521
|
//#region src/trend/movingSum.d.ts
|
|
522
522
|
interface MovingSumOptions {
|
|
@@ -528,7 +528,7 @@ declare const defaultMovingSumOptions: MovingSumOptions;
|
|
|
528
528
|
*
|
|
529
529
|
* Calculates the sum of values in a sliding window of the specified period.
|
|
530
530
|
*/
|
|
531
|
-
declare const msum: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, MovingSumOptions>;
|
|
531
|
+
declare const msum: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, MovingSumOptions>;
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region src/trend/parabolicSar.d.ts
|
|
534
534
|
interface ParabolicSarOptions {
|
|
@@ -607,7 +607,7 @@ declare const defaultQstickOptions: QstickOptions;
|
|
|
607
607
|
declare const qstick: _vulcan_js_core0.SignalGenerator<{
|
|
608
608
|
c: dnum.Numberish;
|
|
609
609
|
o: dnum.Numberish;
|
|
610
|
-
}, Dnum, QstickOptions>;
|
|
610
|
+
}, dnum.Dnum, QstickOptions>;
|
|
611
611
|
//#endregion
|
|
612
612
|
//#region src/trend/rollingMovingAverage.d.ts
|
|
613
613
|
interface RMAOptions {
|
|
@@ -624,7 +624,7 @@ declare const defaultRMAOptions: RMAOptions;
|
|
|
624
624
|
*
|
|
625
625
|
* R[p] and after is R[i] = ((R[i-1]*(p-1)) + v[i]) / p
|
|
626
626
|
*/
|
|
627
|
-
declare const rma: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, RMAOptions>;
|
|
627
|
+
declare const rma: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, RMAOptions>;
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region src/trend/simpleMovingAverage.d.ts
|
|
630
630
|
interface SimpleMovingAverageOptions {
|
|
@@ -649,7 +649,7 @@ declare const defaultSMAOptions: SimpleMovingAverageOptions;
|
|
|
649
649
|
* @param options.period - The period for calculating the moving average (default: 2)
|
|
650
650
|
* @returns Generator yielding SMA values
|
|
651
651
|
*/
|
|
652
|
-
declare const sma: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, SimpleMovingAverageOptions>;
|
|
652
|
+
declare const sma: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, SimpleMovingAverageOptions>;
|
|
653
653
|
//#endregion
|
|
654
654
|
//#region src/trend/sinceChange.d.ts
|
|
655
655
|
/**
|
|
@@ -666,7 +666,7 @@ declare const sma: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, SimpleMovin
|
|
|
666
666
|
* @param source - Iterable of values
|
|
667
667
|
* @returns Generator yielding the number of periods since the last change
|
|
668
668
|
*/
|
|
669
|
-
declare const since: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, Record<string, any>>;
|
|
669
|
+
declare const since: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, Record<string, any>>;
|
|
670
670
|
//#endregion
|
|
671
671
|
//#region src/trend/triangularMovingAverage.d.ts
|
|
672
672
|
interface TriangularMovingAverageOptions {
|
|
@@ -696,7 +696,7 @@ declare const defaultTripleExponentialAverageOptions: TripleExponentialAverageOp
|
|
|
696
696
|
* @param options.period - The lookback period (default: 15)
|
|
697
697
|
* @returns Generator yielding TRIX values as percentages
|
|
698
698
|
*/
|
|
699
|
-
declare const trix: _vulcan_js_core0.SignalGenerator<Numberish, Dnum, TripleExponentialAverageOptions>;
|
|
699
|
+
declare const trix: _vulcan_js_core0.SignalGenerator<Numberish, dnum.Dnum, TripleExponentialAverageOptions>;
|
|
700
700
|
//#endregion
|
|
701
701
|
//#region src/trend/tripleExponentialMovingAverage.d.ts
|
|
702
702
|
interface TripleExponentialMovingAverageOptions {
|
|
@@ -751,7 +751,7 @@ declare const defaultVwmaOptions: VwmaOptions;
|
|
|
751
751
|
* influence to prices with higher trading activity. It is useful for
|
|
752
752
|
* confirming trends and identifying divergences between price and volume.
|
|
753
753
|
*
|
|
754
|
-
* Formula: VWMA = Sum(Close
|
|
754
|
+
* Formula: VWMA = Sum(Close * Volume, period) / Sum(Volume, period)
|
|
755
755
|
*
|
|
756
756
|
* Interpretation:
|
|
757
757
|
* - When VWMA is below price, it suggests bullish sentiment (higher volume at higher prices)
|
|
@@ -766,7 +766,7 @@ declare const defaultVwmaOptions: VwmaOptions;
|
|
|
766
766
|
declare const vwma: _vulcan_js_core0.SignalGenerator<{
|
|
767
767
|
c: dnum.Numberish;
|
|
768
768
|
v: dnum.Numberish;
|
|
769
|
-
}, Dnum, VwmaOptions>;
|
|
769
|
+
}, dnum.Dnum, VwmaOptions>;
|
|
770
770
|
//#endregion
|
|
771
771
|
//#region src/trend/vortex.d.ts
|
|
772
772
|
interface VortexOptions {
|
|
@@ -851,7 +851,7 @@ declare const ad: _vulcan_js_core0.SignalGenerator<{
|
|
|
851
851
|
l: dnum.Numberish;
|
|
852
852
|
c: dnum.Numberish;
|
|
853
853
|
v: dnum.Numberish;
|
|
854
|
-
}, Dnum, Record<string, any>>;
|
|
854
|
+
}, dnum.Dnum, Record<string, any>>;
|
|
855
855
|
//#endregion
|
|
856
856
|
export { AbsolutePriceOscillatorOptions, AroonOptions, AroonPoint, AwesomeOscillatorOptions, ChaikinOscillatorOptions, ChandeForecastOscillatorOptions, CommodityChannelIndexOptions, DoubleExponentialMovingAverageOptions, ExponentialMovingAverageOptions, IchimokuCloudOptions, IchimokuCloudPoint, KDJPoint, MACDOptions, MACDPoint, MassIndexOptions, MovingMaxOptions, MovingMinOptions, MovingSumOptions, PSARPoint, ParabolicSarOptions, PercentagePriceOscillatorOptions, PercentagePriceOscillatorPoint, PercentageVolumeOscillatorOptions, PercentageVolumeOscillatorPoint, PriceRateOfChangeOptions, QstickOptions, RMAOptions, RSIOptions, RandomIndexOptions, SimpleMovingAverageOptions, StochPoint, StochasticOscillatorOptions, TriangularMovingAverageOptions, TripleExponentialAverageOptions, TripleExponentialMovingAverageOptions, VortexOptions, VortexPoint, VwmaOptions, WilliamsROptions, apo as absolutePriceOscillator, apo, ad as accumulationDistribution, ad, ao, ao as awesomeOscillator, aroon, bop as balanceOfPower, bop, cci, cci as commodityChannelIndex, cfo, cfo as chandeForecastOscillator, cmo as chaikinOscillator, cmo, defaultAbsolutePriceOscillatorOptions, defaultAroonOptions, defaultAwesomeOscillatorOptions, defaultCCIOptions, defaultCFOOptions, defaultChaikinOscillatorOptions, defaultDoubleExponentialMovingAverageOptions, defaultExponentialMovingAverageOptions, defaultIchimokuCloudOptions, defaultMACDOptions, defaultMassIndexOptions, defaultMovingMaxOptions, defaultMovingMinOptions, defaultMovingSumOptions, defaultParabolicSarOptions, defaultPercentagePriceOscillatorOptions, defaultPercentageVolumeOscillatorOptions, defaultPriceRateOfChangeOptions, defaultQstickOptions, defaultRMAOptions, defaultRSIOptions, defaultRandomIndexOptions, defaultSMAOptions, defaultStochasticOscillatorOptions, defaultTriangularMovingAverageOptions, defaultTripleExponentialAverageOptions, defaultTripleExponentialMovingAverageOptions, defaultVortexOptions, defaultVwmaOptions, defaultWilliamsROptions, dema, dema as doubleExponentialMovingAverage, ema, ema as exponentialMovingAverage, ichimokuCloud, kdj, kdj as randomIndex, macd, macd as movingAverageConvergenceDivergence, mi as massIndex, mi, mmax, mmax as movingMax, mmin, mmin as movingMin, msum, psar as parabolicSar, psar, ppo as percentagePriceOscillator, ppo, pvo as percentageVolumeOscillator, pvo, roc as priceRateOfChange, roc, qstick, qstick as qstickIndicator, rsi as relativeStrengthIndex, rsi, rma, rma as rollingMovingAverage, sma as simpleMovingAverage, sma, since, since as sinceChange, stoch, stoch as stochasticOscillator, tema, tema as tripleExponentialMovingAverage, trima as triangularMovingAverage, trima, trix as tripleExponentialAverage, trix, typicalPrice, typicalPrice as typicalPriceIndicator, vwma as volumeWeightedMovingAverage, vwma, vortex, vortex as vortexIndicator, willr as williamsR, willr };
|
|
857
857
|
//# sourceMappingURL=index.d.ts.map
|