oakscriptjs 0.2.0 → 0.2.2

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 CHANGED
@@ -33,7 +33,7 @@ export { input_int, input_float, input_bool, input_string, input_source, } from
33
33
  export type { OakScriptContext, ChartAdapter, InputAdapter, SeriesHandle, SeriesOptions, InputConfig, InputOptions, OhlcvData, PlotConfig, HLineConfig, FillConfig, } from './runtime/types';
34
34
  export { LightweightChartsAdapter } from './runtime/adapters/LightweightChartsAdapter';
35
35
  export { SimpleInputAdapter } from './runtime/adapters/SimpleInputAdapter';
36
- export declare const VERSION = "0.3.0";
36
+ export declare const VERSION = "0.2.2";
37
37
  export declare const info: {
38
38
  name: string;
39
39
  version: string;
package/dist/index.js CHANGED
@@ -265,12 +265,12 @@ function macd(source, fastLength, slowLength, signalLength) {
265
265
  }
266
266
  function bb(series, length2, mult2) {
267
267
  const basis = sma(series, length2);
268
- const dev2 = stdev(series, length2);
268
+ const dev3 = stdev(series, length2);
269
269
  const upper2 = [];
270
270
  const lower2 = [];
271
271
  for (let i = 0; i < series.length; i++) {
272
- upper2.push(basis[i] + mult2 * dev2[i]);
273
- lower2.push(basis[i] - mult2 * dev2[i]);
272
+ upper2.push(basis[i] + mult2 * dev3[i]);
273
+ lower2.push(basis[i] - mult2 * dev3[i]);
274
274
  }
275
275
  return [basis, upper2, lower2];
276
276
  }
@@ -474,13 +474,13 @@ function highest(source, length2) {
474
474
  if (i < length2 - 1) {
475
475
  result.push(NaN);
476
476
  } else {
477
- let max5 = -Infinity;
477
+ let max6 = -Infinity;
478
478
  for (let j = 0; j < length2; j++) {
479
479
  if (!isNaN(source[i - j])) {
480
- max5 = Math.max(max5, source[i - j]);
480
+ max6 = Math.max(max6, source[i - j]);
481
481
  }
482
482
  }
483
- result.push(max5 === -Infinity ? NaN : max5);
483
+ result.push(max6 === -Infinity ? NaN : max6);
484
484
  }
485
485
  }
486
486
  return result;
@@ -491,13 +491,13 @@ function lowest(source, length2) {
491
491
  if (i < length2 - 1) {
492
492
  result.push(NaN);
493
493
  } else {
494
- let min5 = Infinity;
494
+ let min6 = Infinity;
495
495
  for (let j = 0; j < length2; j++) {
496
496
  if (!isNaN(source[i - j])) {
497
- min5 = Math.min(min5, source[i - j]);
497
+ min6 = Math.min(min6, source[i - j]);
498
498
  }
499
499
  }
500
- result.push(min5 === Infinity ? NaN : min5);
500
+ result.push(min6 === Infinity ? NaN : min6);
501
501
  }
502
502
  }
503
503
  return result;
@@ -763,10 +763,10 @@ function correlation(source1, source2, length2) {
763
763
  let sum2Sq = 0;
764
764
  for (const [v1, v2] of pairs) {
765
765
  const dev1 = v1 - mean1;
766
- const dev2 = v2 - mean2;
767
- numerator += dev1 * dev2;
766
+ const dev22 = v2 - mean2;
767
+ numerator += dev1 * dev22;
768
768
  sum1Sq += dev1 * dev1;
769
- sum2Sq += dev2 * dev2;
769
+ sum2Sq += dev22 * dev22;
770
770
  }
771
771
  const denominator = Math.sqrt(sum1Sq * sum2Sq);
772
772
  if (denominator === 0) {
@@ -782,11 +782,15 @@ function correlation(source1, source2, length2) {
782
782
  function percentrank(source, length2) {
783
783
  const result = [];
784
784
  for (let i = 0; i < source.length; i++) {
785
- if (i < length2 - 1) {
785
+ if (i < length2) {
786
786
  result.push(NaN);
787
787
  } else {
788
+ if (isNaN(source[i])) {
789
+ result.push(NaN);
790
+ continue;
791
+ }
788
792
  let hasNaN = false;
789
- for (let j = 0; j < length2; j++) {
793
+ for (let j = 1; j <= length2; j++) {
790
794
  if (isNaN(source[i - j])) {
791
795
  hasNaN = true;
792
796
  break;
@@ -797,13 +801,12 @@ function percentrank(source, length2) {
797
801
  } else {
798
802
  const currentValue = source[i];
799
803
  let countLessOrEqual = 0;
800
- for (let j = 0; j < length2; j++) {
804
+ for (let j = 1; j <= length2; j++) {
801
805
  if (source[i - j] <= currentValue) {
802
806
  countLessOrEqual++;
803
807
  }
804
808
  }
805
- const percentRank = (countLessOrEqual - 1) / (length2 - 1) * 100;
806
- result.push(percentRank);
809
+ result.push(countLessOrEqual / length2 * 100);
807
810
  }
808
811
  }
809
812
  }
@@ -831,11 +834,11 @@ function stoch(source, high, low, length2) {
831
834
  if (isNaN(lowestValues[i]) || isNaN(highestValues[i])) {
832
835
  result.push(NaN);
833
836
  } else {
834
- const range3 = highestValues[i] - lowestValues[i];
835
- if (range3 === 0) {
837
+ const range4 = highestValues[i] - lowestValues[i];
838
+ if (range4 === 0) {
836
839
  result.push(NaN);
837
840
  } else {
838
- const stochValue = 100 * (source[i] - lowestValues[i]) / range3;
841
+ const stochValue = 100 * (source[i] - lowestValues[i]) / range4;
839
842
  result.push(stochValue);
840
843
  }
841
844
  }
@@ -902,7 +905,7 @@ function hma(source, length2) {
902
905
  }
903
906
  return wma(diff2, sqrtLength);
904
907
  }
905
- function sar(start, inc, max5, high, low, close) {
908
+ function sar(start, inc, max6, high, low, close) {
906
909
  if (!high || !low || !close) {
907
910
  throw new Error(
908
911
  "ta.sar() requires high, low, and close series. Either pass them explicitly or use createContext({ chart: { high, low, close } }) for implicit data."
@@ -954,12 +957,12 @@ function sar(start, inc, max5, high, low, close) {
954
957
  if (isUpTrend) {
955
958
  if (high[i] > extremePoint) {
956
959
  extremePoint = high[i];
957
- acceleration = Math.min(acceleration + inc, max5);
960
+ acceleration = Math.min(acceleration + inc, max6);
958
961
  }
959
962
  } else {
960
963
  if (low[i] < extremePoint) {
961
964
  extremePoint = low[i];
962
- acceleration = Math.min(acceleration + inc, max5);
965
+ acceleration = Math.min(acceleration + inc, max6);
963
966
  }
964
967
  }
965
968
  }
@@ -1195,22 +1198,22 @@ function cmo(source, length2) {
1195
1198
  }
1196
1199
  function kc(source, length2, mult2, useTrueRange = true, high, low, close) {
1197
1200
  const middle = ema(source, length2);
1198
- let range3;
1201
+ let range4;
1199
1202
  if (useTrueRange) {
1200
1203
  if (!high || !low || !close) {
1201
1204
  throw new Error("ta.kc() with useTrueRange=true requires high, low, and close data");
1202
1205
  }
1203
- range3 = tr(false, high, low, close);
1206
+ range4 = tr(false, high, low, close);
1204
1207
  } else {
1205
1208
  if (!high || !low) {
1206
1209
  throw new Error("ta.kc() requires high and low data");
1207
1210
  }
1208
- range3 = [];
1211
+ range4 = [];
1209
1212
  for (let i = 0; i < high.length; i++) {
1210
- range3.push(high[i] - low[i]);
1213
+ range4.push(high[i] - low[i]);
1211
1214
  }
1212
1215
  }
1213
- const rangeEma = ema(range3, length2);
1216
+ const rangeEma = ema(range4, length2);
1214
1217
  const upper2 = [];
1215
1218
  const lower2 = [];
1216
1219
  for (let i = 0; i < middle.length; i++) {
@@ -1247,11 +1250,11 @@ function wpr(high, low, close, length2 = 14) {
1247
1250
  if (low[j] < lowestLow)
1248
1251
  lowestLow = low[j];
1249
1252
  }
1250
- const range3 = highestHigh - lowestLow;
1251
- if (range3 === 0) {
1253
+ const range4 = highestHigh - lowestLow;
1254
+ if (range4 === 0) {
1252
1255
  result.push(NaN);
1253
1256
  } else {
1254
- const wprValue = (highestHigh - close[i]) / range3 * -100;
1257
+ const wprValue = (highestHigh - close[i]) / range4 * -100;
1255
1258
  result.push(wprValue);
1256
1259
  }
1257
1260
  }
@@ -1417,8 +1420,8 @@ function cog(source, length2 = 10) {
1417
1420
  if (denominator === 0) {
1418
1421
  result.push(NaN);
1419
1422
  } else {
1420
- const cog2 = -1 * (numerator / denominator) + (length2 + 1) / 2;
1421
- result.push(cog2);
1423
+ const cog3 = -1 * (numerator / denominator) + (length2 + 1) / 2;
1424
+ result.push(cog3);
1422
1425
  }
1423
1426
  }
1424
1427
  return result;
@@ -1554,12 +1557,30 @@ function rci(source, length2) {
1554
1557
  let sumSquaredDiff = 0;
1555
1558
  for (let j = 0; j < length2; j++) {
1556
1559
  const timeRank = j + 1;
1557
- const valueRank = ranks[j];
1558
- const diff2 = timeRank - valueRank;
1560
+ const diff2 = ranks[j] - timeRank;
1559
1561
  sumSquaredDiff += diff2 * diff2;
1560
1562
  }
1561
1563
  const n = length2;
1562
- const rho = 1 - 6 * sumSquaredDiff / (n * (n * n - 1));
1564
+ const base = (n * n * n - n) / 12;
1565
+ let tieCorrection = 0;
1566
+ for (let j = 0; j < sorted.length; ) {
1567
+ let tieCount = 1;
1568
+ while (j + tieCount < sorted.length && sorted[j].value === sorted[j + tieCount].value) {
1569
+ tieCount++;
1570
+ }
1571
+ if (tieCount > 1) {
1572
+ tieCorrection += (tieCount * tieCount * tieCount - tieCount) / 12;
1573
+ }
1574
+ j += tieCount;
1575
+ }
1576
+ const A = base - tieCorrection;
1577
+ const B = base;
1578
+ let rho;
1579
+ if (A === 0 || B === 0) {
1580
+ rho = 0;
1581
+ } else {
1582
+ rho = (A + B - sumSquaredDiff) / (2 * Math.sqrt(A * B));
1583
+ }
1563
1584
  result.push(rho * 100);
1564
1585
  }
1565
1586
  return result;
@@ -1680,15 +1701,15 @@ function calculatePivotLevels(type, h, l, c, o) {
1680
1701
  levels[2] = x / 2 - h;
1681
1702
  break;
1682
1703
  case "Camarilla":
1683
- const range3 = h - l;
1684
- levels[1] = c + range3 * 1.1 / 12;
1685
- levels[2] = c - range3 * 1.1 / 12;
1686
- levels[3] = c + range3 * 1.1 / 6;
1687
- levels[4] = c - range3 * 1.1 / 6;
1688
- levels[5] = c + range3 * 1.1 / 4;
1689
- levels[6] = c - range3 * 1.1 / 4;
1690
- levels[7] = c + range3 * 1.1 / 2;
1691
- levels[8] = c - range3 * 1.1 / 2;
1704
+ const range4 = h - l;
1705
+ levels[1] = c + range4 * 1.1 / 12;
1706
+ levels[2] = c - range4 * 1.1 / 12;
1707
+ levels[3] = c + range4 * 1.1 / 6;
1708
+ levels[4] = c - range4 * 1.1 / 6;
1709
+ levels[5] = c + range4 * 1.1 / 4;
1710
+ levels[6] = c - range4 * 1.1 / 4;
1711
+ levels[7] = c + range4 * 1.1 / 2;
1712
+ levels[8] = c - range4 * 1.1 / 2;
1692
1713
  levels[9] = h;
1693
1714
  levels[10] = l;
1694
1715
  break;
@@ -2772,10 +2793,10 @@ function todegrees(radians) {
2772
2793
  }
2773
2794
  return radians * (180 / Math.PI);
2774
2795
  }
2775
- function random(min5, max5, _seed) {
2796
+ function random(min6, max6, _seed) {
2776
2797
  const rand = Math.random();
2777
- if (min5 !== void 0 && max5 !== void 0) {
2778
- return min5 + rand * (max5 - min5);
2798
+ if (min6 !== void 0 && max6 !== void 0) {
2799
+ return min6 + rand * (max6 - min6);
2779
2800
  }
2780
2801
  return rand;
2781
2802
  }
@@ -2987,16 +3008,16 @@ function median2(id) {
2987
3008
  function mode2(id) {
2988
3009
  const frequency = /* @__PURE__ */ new Map();
2989
3010
  let maxFreq = 0;
2990
- let mode4 = id[0];
3011
+ let mode5 = id[0];
2991
3012
  for (const val of id) {
2992
3013
  const freq = (frequency.get(val) || 0) + 1;
2993
3014
  frequency.set(val, freq);
2994
3015
  if (freq > maxFreq) {
2995
3016
  maxFreq = freq;
2996
- mode4 = val;
3017
+ mode5 = val;
2997
3018
  }
2998
3019
  }
2999
- return mode4;
3020
+ return mode5;
3000
3021
  }
3001
3022
  function stdev2(id) {
3002
3023
  const mean = avg2(id);
@@ -5247,21 +5268,45 @@ var ta_series_exports = {};
5247
5268
  __export(ta_series_exports, {
5248
5269
  alma: () => alma2,
5249
5270
  atr: () => atr2,
5271
+ barssince: () => barssince2,
5250
5272
  bb: () => bb2,
5273
+ bbw: () => bbw2,
5251
5274
  cci: () => cci2,
5252
5275
  change: () => change2,
5276
+ cmo: () => cmo2,
5277
+ cog: () => cog2,
5278
+ correlation: () => correlation2,
5253
5279
  cross: () => cross2,
5254
5280
  crossover: () => crossover2,
5255
5281
  crossunder: () => crossunder2,
5256
5282
  cum: () => cum2,
5283
+ dev: () => dev2,
5284
+ dmi: () => dmi2,
5257
5285
  ema: () => ema2,
5258
5286
  falling: () => falling2,
5259
5287
  highest: () => highest2,
5288
+ highestbars: () => highestbars2,
5289
+ hma: () => hma2,
5260
5290
  ichimoku: () => ichimoku2,
5291
+ kc: () => kc2,
5292
+ kcw: () => kcw2,
5261
5293
  linreg: () => linreg2,
5262
5294
  lowest: () => lowest2,
5295
+ lowestbars: () => lowestbars2,
5263
5296
  macd: () => macd2,
5297
+ max: () => max5,
5298
+ median: () => median4,
5299
+ mfi: () => mfi2,
5300
+ min: () => min5,
5301
+ mode: () => mode4,
5264
5302
  mom: () => mom2,
5303
+ percentile_linear_interpolation: () => percentile_linear_interpolation3,
5304
+ percentile_nearest_rank: () => percentile_nearest_rank3,
5305
+ percentrank: () => percentrank3,
5306
+ pivothigh: () => pivothigh2,
5307
+ pivotlow: () => pivotlow2,
5308
+ range: () => range3,
5309
+ rci: () => rci2,
5265
5310
  rising: () => rising2,
5266
5311
  rma: () => rma2,
5267
5312
  roc: () => roc2,
@@ -5271,11 +5316,16 @@ __export(ta_series_exports, {
5271
5316
  stdev: () => stdev3,
5272
5317
  stoch: () => stoch2,
5273
5318
  supertrend: () => supertrend2,
5319
+ swma: () => swma2,
5274
5320
  ta: () => ta,
5275
5321
  tr: () => tr2,
5322
+ tsi: () => tsi2,
5323
+ valuewhen: () => valuewhen2,
5324
+ variance: () => variance3,
5276
5325
  vwap: () => vwap2,
5277
5326
  vwma: () => vwma2,
5278
5327
  wma: () => wma2,
5328
+ wpr: () => wpr2,
5279
5329
  zigzag: () => zigzag2
5280
5330
  });
5281
5331
  function sma2(source, length2) {
@@ -5507,11 +5557,174 @@ function cci2(source, length2) {
5507
5557
  const result = cci(sourceValues, length2);
5508
5558
  return Series.fromArray(bars, result);
5509
5559
  }
5510
- function sar2(bars, start = 0.02, inc = 0.02, max5 = 0.2) {
5560
+ function sar2(bars, start = 0.02, inc = 0.02, max6 = 0.2) {
5561
+ const high = bars.map((b2) => b2.high);
5562
+ const low = bars.map((b2) => b2.low);
5563
+ const close = bars.map((b2) => b2.close);
5564
+ const result = sar(start, inc, max6, high, low, close);
5565
+ return Series.fromArray(bars, result);
5566
+ }
5567
+ function dev2(source, length2) {
5568
+ const bars = source.bars;
5569
+ const result = dev(source.toArray(), length2);
5570
+ return Series.fromArray(bars, result);
5571
+ }
5572
+ function variance3(source, length2, biased = true) {
5573
+ const bars = source.bars;
5574
+ const result = variance(source.toArray(), length2, biased);
5575
+ return Series.fromArray(bars, result);
5576
+ }
5577
+ function median4(source, length2) {
5578
+ const bars = source.bars;
5579
+ const result = median(source.toArray(), length2);
5580
+ return Series.fromArray(bars, result);
5581
+ }
5582
+ function swma2(source) {
5583
+ const bars = source.bars;
5584
+ const result = swma(source.toArray());
5585
+ return Series.fromArray(bars, result);
5586
+ }
5587
+ function correlation2(source1, source2, length2) {
5588
+ const bars = source1.bars;
5589
+ const result = correlation(source1.toArray(), source2.toArray(), length2);
5590
+ return Series.fromArray(bars, result);
5591
+ }
5592
+ function percentrank3(source, length2) {
5593
+ const bars = source.bars;
5594
+ const result = percentrank(source.toArray(), length2);
5595
+ return Series.fromArray(bars, result);
5596
+ }
5597
+ function mfi2(source, length2, volume) {
5598
+ const bars = source.bars;
5599
+ const result = mfi(source.toArray(), length2, volume.toArray());
5600
+ return Series.fromArray(bars, result);
5601
+ }
5602
+ function hma2(source, length2) {
5603
+ const bars = source.bars;
5604
+ const result = hma(source.toArray(), length2);
5605
+ return Series.fromArray(bars, result);
5606
+ }
5607
+ function pivothigh2(source, leftbars, rightbars) {
5608
+ const bars = source.bars;
5609
+ const result = pivothigh(source.toArray(), leftbars, rightbars);
5610
+ return Series.fromArray(bars, result);
5611
+ }
5612
+ function pivotlow2(source, leftbars, rightbars) {
5613
+ const bars = source.bars;
5614
+ const result = pivotlow(source.toArray(), leftbars, rightbars);
5615
+ return Series.fromArray(bars, result);
5616
+ }
5617
+ function barssince2(condition) {
5618
+ const bars = condition.bars;
5619
+ const boolValues = condition.toArray().map((v) => v === 1);
5620
+ const result = barssince(boolValues);
5621
+ return Series.fromArray(bars, result);
5622
+ }
5623
+ function valuewhen2(condition, source, occurrence) {
5624
+ const bars = condition.bars;
5625
+ const boolValues = condition.toArray().map((v) => v === 1);
5626
+ const result = valuewhen(boolValues, source.toArray(), occurrence);
5627
+ return Series.fromArray(bars, result);
5628
+ }
5629
+ function dmi2(bars, diLength, adxSmoothing) {
5630
+ const high = bars.map((b2) => b2.high);
5631
+ const low = bars.map((b2) => b2.low);
5632
+ const close = bars.map((b2) => b2.close);
5633
+ const [plusDI, minusDI, adx] = dmi(diLength, adxSmoothing, high, low, close);
5634
+ return [
5635
+ Series.fromArray(bars, plusDI),
5636
+ Series.fromArray(bars, minusDI),
5637
+ Series.fromArray(bars, adx)
5638
+ ];
5639
+ }
5640
+ function tsi2(source, shortLength, longLength) {
5641
+ const bars = source.bars;
5642
+ const result = tsi(source.toArray(), shortLength, longLength);
5643
+ return Series.fromArray(bars, result);
5644
+ }
5645
+ function cmo2(source, length2) {
5646
+ const bars = source.bars;
5647
+ const result = cmo(source.toArray(), length2);
5648
+ return Series.fromArray(bars, result);
5649
+ }
5650
+ function kc2(bars, source, length2, mult2, useTrueRange = true) {
5511
5651
  const high = bars.map((b2) => b2.high);
5512
5652
  const low = bars.map((b2) => b2.low);
5513
5653
  const close = bars.map((b2) => b2.close);
5514
- const result = sar(start, inc, max5, high, low, close);
5654
+ const [middle, upper2, lower2] = kc(source.toArray(), length2, mult2, useTrueRange, high, low, close);
5655
+ return [
5656
+ Series.fromArray(bars, middle),
5657
+ Series.fromArray(bars, upper2),
5658
+ Series.fromArray(bars, lower2)
5659
+ ];
5660
+ }
5661
+ function bbw2(source, length2, mult2) {
5662
+ const bars = source.bars;
5663
+ const result = bbw(source.toArray(), length2, mult2);
5664
+ return Series.fromArray(bars, result);
5665
+ }
5666
+ function wpr2(bars, length2 = 14) {
5667
+ const high = bars.map((b2) => b2.high);
5668
+ const low = bars.map((b2) => b2.low);
5669
+ const close = bars.map((b2) => b2.close);
5670
+ const result = wpr(high, low, close, length2);
5671
+ return Series.fromArray(bars, result);
5672
+ }
5673
+ function kcw2(bars, source, length2 = 20, mult2 = 2, useTrueRange = true) {
5674
+ const high = bars.map((b2) => b2.high);
5675
+ const low = bars.map((b2) => b2.low);
5676
+ const close = bars.map((b2) => b2.close);
5677
+ const result = kcw(source.toArray(), length2, mult2, useTrueRange, high, low, close);
5678
+ return Series.fromArray(bars, result);
5679
+ }
5680
+ function range3(high, low) {
5681
+ const bars = high.bars;
5682
+ const result = range(high.toArray(), low.toArray());
5683
+ return Series.fromArray(bars, result);
5684
+ }
5685
+ function highestbars2(source, length2) {
5686
+ const bars = source.bars;
5687
+ const result = highestbars(source.toArray(), length2);
5688
+ return Series.fromArray(bars, result);
5689
+ }
5690
+ function lowestbars2(source, length2) {
5691
+ const bars = source.bars;
5692
+ const result = lowestbars(source.toArray(), length2);
5693
+ return Series.fromArray(bars, result);
5694
+ }
5695
+ function max5(source1, source2) {
5696
+ const bars = source1.bars;
5697
+ const result = max(source1.toArray(), source2.toArray());
5698
+ return Series.fromArray(bars, result);
5699
+ }
5700
+ function min5(source1, source2) {
5701
+ const bars = source1.bars;
5702
+ const result = min(source1.toArray(), source2.toArray());
5703
+ return Series.fromArray(bars, result);
5704
+ }
5705
+ function cog2(source, length2 = 10) {
5706
+ const bars = source.bars;
5707
+ const result = cog(source.toArray(), length2);
5708
+ return Series.fromArray(bars, result);
5709
+ }
5710
+ function mode4(source, length2) {
5711
+ const bars = source.bars;
5712
+ const result = mode(source.toArray(), length2);
5713
+ return Series.fromArray(bars, result);
5714
+ }
5715
+ function percentile_linear_interpolation3(source, length2, percentage) {
5716
+ const bars = source.bars;
5717
+ const result = percentile_linear_interpolation(source.toArray(), length2, percentage);
5718
+ return Series.fromArray(bars, result);
5719
+ }
5720
+ function percentile_nearest_rank3(source, length2, percentage) {
5721
+ const bars = source.bars;
5722
+ const result = percentile_nearest_rank(source.toArray(), length2, percentage);
5723
+ return Series.fromArray(bars, result);
5724
+ }
5725
+ function rci2(source, length2) {
5726
+ const bars = source.bars;
5727
+ const result = rci(source.toArray(), length2);
5515
5728
  return Series.fromArray(bars, result);
5516
5729
  }
5517
5730
  var ta = {
@@ -5545,7 +5758,36 @@ var ta = {
5545
5758
  alma: alma2,
5546
5759
  zigzag: zigzag2,
5547
5760
  cci: cci2,
5548
- sar: sar2
5761
+ sar: sar2,
5762
+ dev: dev2,
5763
+ variance: variance3,
5764
+ median: median4,
5765
+ swma: swma2,
5766
+ correlation: correlation2,
5767
+ percentrank: percentrank3,
5768
+ mfi: mfi2,
5769
+ hma: hma2,
5770
+ pivothigh: pivothigh2,
5771
+ pivotlow: pivotlow2,
5772
+ barssince: barssince2,
5773
+ valuewhen: valuewhen2,
5774
+ dmi: dmi2,
5775
+ tsi: tsi2,
5776
+ cmo: cmo2,
5777
+ kc: kc2,
5778
+ bbw: bbw2,
5779
+ wpr: wpr2,
5780
+ kcw: kcw2,
5781
+ range: range3,
5782
+ highestbars: highestbars2,
5783
+ lowestbars: lowestbars2,
5784
+ max: max5,
5785
+ min: min5,
5786
+ cog: cog2,
5787
+ mode: mode4,
5788
+ percentile_linear_interpolation: percentile_linear_interpolation3,
5789
+ percentile_nearest_rank: percentile_nearest_rank3,
5790
+ rci: rci2
5549
5791
  };
5550
5792
 
5551
5793
  // src/utils/index.ts
@@ -5760,9 +6002,9 @@ var ZigZag = class {
5760
6002
  return true;
5761
6003
  }
5762
6004
  } else {
5763
- const dev2 = this.calcDev(last2.end.price, point.price);
6005
+ const dev3 = this.calcDev(last2.end.price, point.price);
5764
6006
  const threshold = this.settings.devThreshold;
5765
- const meetsThreshold = last2.isHigh ? dev2 <= -threshold : dev2 >= threshold;
6007
+ const meetsThreshold = last2.isHigh ? dev3 <= -threshold : dev3 >= threshold;
5766
6008
  if (meetsThreshold) {
5767
6009
  this.pivots.push({
5768
6010
  isHigh,
@@ -6493,7 +6735,7 @@ var SimpleInputAdapter = class {
6493
6735
  };
6494
6736
 
6495
6737
  // src/index.ts
6496
- var VERSION = "0.3.0";
6738
+ var VERSION = "0.2.2";
6497
6739
  var info = {
6498
6740
  name: "OakScriptJS",
6499
6741
  version: VERSION,
package/dist/index.mjs CHANGED
@@ -165,12 +165,12 @@ function macd(source, fastLength, slowLength, signalLength) {
165
165
  }
166
166
  function bb(series, length2, mult2) {
167
167
  const basis = sma(series, length2);
168
- const dev2 = stdev(series, length2);
168
+ const dev3 = stdev(series, length2);
169
169
  const upper2 = [];
170
170
  const lower2 = [];
171
171
  for (let i = 0; i < series.length; i++) {
172
- upper2.push(basis[i] + mult2 * dev2[i]);
173
- lower2.push(basis[i] - mult2 * dev2[i]);
172
+ upper2.push(basis[i] + mult2 * dev3[i]);
173
+ lower2.push(basis[i] - mult2 * dev3[i]);
174
174
  }
175
175
  return [basis, upper2, lower2];
176
176
  }
@@ -374,13 +374,13 @@ function highest(source, length2) {
374
374
  if (i < length2 - 1) {
375
375
  result.push(NaN);
376
376
  } else {
377
- let max5 = -Infinity;
377
+ let max6 = -Infinity;
378
378
  for (let j = 0; j < length2; j++) {
379
379
  if (!isNaN(source[i - j])) {
380
- max5 = Math.max(max5, source[i - j]);
380
+ max6 = Math.max(max6, source[i - j]);
381
381
  }
382
382
  }
383
- result.push(max5 === -Infinity ? NaN : max5);
383
+ result.push(max6 === -Infinity ? NaN : max6);
384
384
  }
385
385
  }
386
386
  return result;
@@ -391,13 +391,13 @@ function lowest(source, length2) {
391
391
  if (i < length2 - 1) {
392
392
  result.push(NaN);
393
393
  } else {
394
- let min5 = Infinity;
394
+ let min6 = Infinity;
395
395
  for (let j = 0; j < length2; j++) {
396
396
  if (!isNaN(source[i - j])) {
397
- min5 = Math.min(min5, source[i - j]);
397
+ min6 = Math.min(min6, source[i - j]);
398
398
  }
399
399
  }
400
- result.push(min5 === Infinity ? NaN : min5);
400
+ result.push(min6 === Infinity ? NaN : min6);
401
401
  }
402
402
  }
403
403
  return result;
@@ -663,10 +663,10 @@ function correlation(source1, source2, length2) {
663
663
  let sum2Sq = 0;
664
664
  for (const [v1, v2] of pairs) {
665
665
  const dev1 = v1 - mean1;
666
- const dev2 = v2 - mean2;
667
- numerator += dev1 * dev2;
666
+ const dev22 = v2 - mean2;
667
+ numerator += dev1 * dev22;
668
668
  sum1Sq += dev1 * dev1;
669
- sum2Sq += dev2 * dev2;
669
+ sum2Sq += dev22 * dev22;
670
670
  }
671
671
  const denominator = Math.sqrt(sum1Sq * sum2Sq);
672
672
  if (denominator === 0) {
@@ -682,11 +682,15 @@ function correlation(source1, source2, length2) {
682
682
  function percentrank(source, length2) {
683
683
  const result = [];
684
684
  for (let i = 0; i < source.length; i++) {
685
- if (i < length2 - 1) {
685
+ if (i < length2) {
686
686
  result.push(NaN);
687
687
  } else {
688
+ if (isNaN(source[i])) {
689
+ result.push(NaN);
690
+ continue;
691
+ }
688
692
  let hasNaN = false;
689
- for (let j = 0; j < length2; j++) {
693
+ for (let j = 1; j <= length2; j++) {
690
694
  if (isNaN(source[i - j])) {
691
695
  hasNaN = true;
692
696
  break;
@@ -697,13 +701,12 @@ function percentrank(source, length2) {
697
701
  } else {
698
702
  const currentValue = source[i];
699
703
  let countLessOrEqual = 0;
700
- for (let j = 0; j < length2; j++) {
704
+ for (let j = 1; j <= length2; j++) {
701
705
  if (source[i - j] <= currentValue) {
702
706
  countLessOrEqual++;
703
707
  }
704
708
  }
705
- const percentRank = (countLessOrEqual - 1) / (length2 - 1) * 100;
706
- result.push(percentRank);
709
+ result.push(countLessOrEqual / length2 * 100);
707
710
  }
708
711
  }
709
712
  }
@@ -731,11 +734,11 @@ function stoch(source, high, low, length2) {
731
734
  if (isNaN(lowestValues[i]) || isNaN(highestValues[i])) {
732
735
  result.push(NaN);
733
736
  } else {
734
- const range3 = highestValues[i] - lowestValues[i];
735
- if (range3 === 0) {
737
+ const range4 = highestValues[i] - lowestValues[i];
738
+ if (range4 === 0) {
736
739
  result.push(NaN);
737
740
  } else {
738
- const stochValue = 100 * (source[i] - lowestValues[i]) / range3;
741
+ const stochValue = 100 * (source[i] - lowestValues[i]) / range4;
739
742
  result.push(stochValue);
740
743
  }
741
744
  }
@@ -802,7 +805,7 @@ function hma(source, length2) {
802
805
  }
803
806
  return wma(diff2, sqrtLength);
804
807
  }
805
- function sar(start, inc, max5, high, low, close) {
808
+ function sar(start, inc, max6, high, low, close) {
806
809
  if (!high || !low || !close) {
807
810
  throw new Error(
808
811
  "ta.sar() requires high, low, and close series. Either pass them explicitly or use createContext({ chart: { high, low, close } }) for implicit data."
@@ -854,12 +857,12 @@ function sar(start, inc, max5, high, low, close) {
854
857
  if (isUpTrend) {
855
858
  if (high[i] > extremePoint) {
856
859
  extremePoint = high[i];
857
- acceleration = Math.min(acceleration + inc, max5);
860
+ acceleration = Math.min(acceleration + inc, max6);
858
861
  }
859
862
  } else {
860
863
  if (low[i] < extremePoint) {
861
864
  extremePoint = low[i];
862
- acceleration = Math.min(acceleration + inc, max5);
865
+ acceleration = Math.min(acceleration + inc, max6);
863
866
  }
864
867
  }
865
868
  }
@@ -1095,22 +1098,22 @@ function cmo(source, length2) {
1095
1098
  }
1096
1099
  function kc(source, length2, mult2, useTrueRange = true, high, low, close) {
1097
1100
  const middle = ema(source, length2);
1098
- let range3;
1101
+ let range4;
1099
1102
  if (useTrueRange) {
1100
1103
  if (!high || !low || !close) {
1101
1104
  throw new Error("ta.kc() with useTrueRange=true requires high, low, and close data");
1102
1105
  }
1103
- range3 = tr(false, high, low, close);
1106
+ range4 = tr(false, high, low, close);
1104
1107
  } else {
1105
1108
  if (!high || !low) {
1106
1109
  throw new Error("ta.kc() requires high and low data");
1107
1110
  }
1108
- range3 = [];
1111
+ range4 = [];
1109
1112
  for (let i = 0; i < high.length; i++) {
1110
- range3.push(high[i] - low[i]);
1113
+ range4.push(high[i] - low[i]);
1111
1114
  }
1112
1115
  }
1113
- const rangeEma = ema(range3, length2);
1116
+ const rangeEma = ema(range4, length2);
1114
1117
  const upper2 = [];
1115
1118
  const lower2 = [];
1116
1119
  for (let i = 0; i < middle.length; i++) {
@@ -1147,11 +1150,11 @@ function wpr(high, low, close, length2 = 14) {
1147
1150
  if (low[j] < lowestLow)
1148
1151
  lowestLow = low[j];
1149
1152
  }
1150
- const range3 = highestHigh - lowestLow;
1151
- if (range3 === 0) {
1153
+ const range4 = highestHigh - lowestLow;
1154
+ if (range4 === 0) {
1152
1155
  result.push(NaN);
1153
1156
  } else {
1154
- const wprValue = (highestHigh - close[i]) / range3 * -100;
1157
+ const wprValue = (highestHigh - close[i]) / range4 * -100;
1155
1158
  result.push(wprValue);
1156
1159
  }
1157
1160
  }
@@ -1317,8 +1320,8 @@ function cog(source, length2 = 10) {
1317
1320
  if (denominator === 0) {
1318
1321
  result.push(NaN);
1319
1322
  } else {
1320
- const cog2 = -1 * (numerator / denominator) + (length2 + 1) / 2;
1321
- result.push(cog2);
1323
+ const cog3 = -1 * (numerator / denominator) + (length2 + 1) / 2;
1324
+ result.push(cog3);
1322
1325
  }
1323
1326
  }
1324
1327
  return result;
@@ -1454,12 +1457,30 @@ function rci(source, length2) {
1454
1457
  let sumSquaredDiff = 0;
1455
1458
  for (let j = 0; j < length2; j++) {
1456
1459
  const timeRank = j + 1;
1457
- const valueRank = ranks[j];
1458
- const diff2 = timeRank - valueRank;
1460
+ const diff2 = ranks[j] - timeRank;
1459
1461
  sumSquaredDiff += diff2 * diff2;
1460
1462
  }
1461
1463
  const n = length2;
1462
- const rho = 1 - 6 * sumSquaredDiff / (n * (n * n - 1));
1464
+ const base = (n * n * n - n) / 12;
1465
+ let tieCorrection = 0;
1466
+ for (let j = 0; j < sorted.length; ) {
1467
+ let tieCount = 1;
1468
+ while (j + tieCount < sorted.length && sorted[j].value === sorted[j + tieCount].value) {
1469
+ tieCount++;
1470
+ }
1471
+ if (tieCount > 1) {
1472
+ tieCorrection += (tieCount * tieCount * tieCount - tieCount) / 12;
1473
+ }
1474
+ j += tieCount;
1475
+ }
1476
+ const A = base - tieCorrection;
1477
+ const B = base;
1478
+ let rho;
1479
+ if (A === 0 || B === 0) {
1480
+ rho = 0;
1481
+ } else {
1482
+ rho = (A + B - sumSquaredDiff) / (2 * Math.sqrt(A * B));
1483
+ }
1463
1484
  result.push(rho * 100);
1464
1485
  }
1465
1486
  return result;
@@ -1580,15 +1601,15 @@ function calculatePivotLevels(type, h, l, c, o) {
1580
1601
  levels[2] = x / 2 - h;
1581
1602
  break;
1582
1603
  case "Camarilla":
1583
- const range3 = h - l;
1584
- levels[1] = c + range3 * 1.1 / 12;
1585
- levels[2] = c - range3 * 1.1 / 12;
1586
- levels[3] = c + range3 * 1.1 / 6;
1587
- levels[4] = c - range3 * 1.1 / 6;
1588
- levels[5] = c + range3 * 1.1 / 4;
1589
- levels[6] = c - range3 * 1.1 / 4;
1590
- levels[7] = c + range3 * 1.1 / 2;
1591
- levels[8] = c - range3 * 1.1 / 2;
1604
+ const range4 = h - l;
1605
+ levels[1] = c + range4 * 1.1 / 12;
1606
+ levels[2] = c - range4 * 1.1 / 12;
1607
+ levels[3] = c + range4 * 1.1 / 6;
1608
+ levels[4] = c - range4 * 1.1 / 6;
1609
+ levels[5] = c + range4 * 1.1 / 4;
1610
+ levels[6] = c - range4 * 1.1 / 4;
1611
+ levels[7] = c + range4 * 1.1 / 2;
1612
+ levels[8] = c - range4 * 1.1 / 2;
1592
1613
  levels[9] = h;
1593
1614
  levels[10] = l;
1594
1615
  break;
@@ -2672,10 +2693,10 @@ function todegrees(radians) {
2672
2693
  }
2673
2694
  return radians * (180 / Math.PI);
2674
2695
  }
2675
- function random(min5, max5, _seed) {
2696
+ function random(min6, max6, _seed) {
2676
2697
  const rand = Math.random();
2677
- if (min5 !== void 0 && max5 !== void 0) {
2678
- return min5 + rand * (max5 - min5);
2698
+ if (min6 !== void 0 && max6 !== void 0) {
2699
+ return min6 + rand * (max6 - min6);
2679
2700
  }
2680
2701
  return rand;
2681
2702
  }
@@ -2887,16 +2908,16 @@ function median2(id) {
2887
2908
  function mode2(id) {
2888
2909
  const frequency = /* @__PURE__ */ new Map();
2889
2910
  let maxFreq = 0;
2890
- let mode4 = id[0];
2911
+ let mode5 = id[0];
2891
2912
  for (const val of id) {
2892
2913
  const freq = (frequency.get(val) || 0) + 1;
2893
2914
  frequency.set(val, freq);
2894
2915
  if (freq > maxFreq) {
2895
2916
  maxFreq = freq;
2896
- mode4 = val;
2917
+ mode5 = val;
2897
2918
  }
2898
2919
  }
2899
- return mode4;
2920
+ return mode5;
2900
2921
  }
2901
2922
  function stdev2(id) {
2902
2923
  const mean = avg2(id);
@@ -5147,21 +5168,45 @@ var ta_series_exports = {};
5147
5168
  __export(ta_series_exports, {
5148
5169
  alma: () => alma2,
5149
5170
  atr: () => atr2,
5171
+ barssince: () => barssince2,
5150
5172
  bb: () => bb2,
5173
+ bbw: () => bbw2,
5151
5174
  cci: () => cci2,
5152
5175
  change: () => change2,
5176
+ cmo: () => cmo2,
5177
+ cog: () => cog2,
5178
+ correlation: () => correlation2,
5153
5179
  cross: () => cross2,
5154
5180
  crossover: () => crossover2,
5155
5181
  crossunder: () => crossunder2,
5156
5182
  cum: () => cum2,
5183
+ dev: () => dev2,
5184
+ dmi: () => dmi2,
5157
5185
  ema: () => ema2,
5158
5186
  falling: () => falling2,
5159
5187
  highest: () => highest2,
5188
+ highestbars: () => highestbars2,
5189
+ hma: () => hma2,
5160
5190
  ichimoku: () => ichimoku2,
5191
+ kc: () => kc2,
5192
+ kcw: () => kcw2,
5161
5193
  linreg: () => linreg2,
5162
5194
  lowest: () => lowest2,
5195
+ lowestbars: () => lowestbars2,
5163
5196
  macd: () => macd2,
5197
+ max: () => max5,
5198
+ median: () => median4,
5199
+ mfi: () => mfi2,
5200
+ min: () => min5,
5201
+ mode: () => mode4,
5164
5202
  mom: () => mom2,
5203
+ percentile_linear_interpolation: () => percentile_linear_interpolation3,
5204
+ percentile_nearest_rank: () => percentile_nearest_rank3,
5205
+ percentrank: () => percentrank3,
5206
+ pivothigh: () => pivothigh2,
5207
+ pivotlow: () => pivotlow2,
5208
+ range: () => range3,
5209
+ rci: () => rci2,
5165
5210
  rising: () => rising2,
5166
5211
  rma: () => rma2,
5167
5212
  roc: () => roc2,
@@ -5171,11 +5216,16 @@ __export(ta_series_exports, {
5171
5216
  stdev: () => stdev3,
5172
5217
  stoch: () => stoch2,
5173
5218
  supertrend: () => supertrend2,
5219
+ swma: () => swma2,
5174
5220
  ta: () => ta,
5175
5221
  tr: () => tr2,
5222
+ tsi: () => tsi2,
5223
+ valuewhen: () => valuewhen2,
5224
+ variance: () => variance3,
5176
5225
  vwap: () => vwap2,
5177
5226
  vwma: () => vwma2,
5178
5227
  wma: () => wma2,
5228
+ wpr: () => wpr2,
5179
5229
  zigzag: () => zigzag2
5180
5230
  });
5181
5231
  function sma2(source, length2) {
@@ -5407,11 +5457,174 @@ function cci2(source, length2) {
5407
5457
  const result = cci(sourceValues, length2);
5408
5458
  return Series.fromArray(bars, result);
5409
5459
  }
5410
- function sar2(bars, start = 0.02, inc = 0.02, max5 = 0.2) {
5460
+ function sar2(bars, start = 0.02, inc = 0.02, max6 = 0.2) {
5461
+ const high = bars.map((b2) => b2.high);
5462
+ const low = bars.map((b2) => b2.low);
5463
+ const close = bars.map((b2) => b2.close);
5464
+ const result = sar(start, inc, max6, high, low, close);
5465
+ return Series.fromArray(bars, result);
5466
+ }
5467
+ function dev2(source, length2) {
5468
+ const bars = source.bars;
5469
+ const result = dev(source.toArray(), length2);
5470
+ return Series.fromArray(bars, result);
5471
+ }
5472
+ function variance3(source, length2, biased = true) {
5473
+ const bars = source.bars;
5474
+ const result = variance(source.toArray(), length2, biased);
5475
+ return Series.fromArray(bars, result);
5476
+ }
5477
+ function median4(source, length2) {
5478
+ const bars = source.bars;
5479
+ const result = median(source.toArray(), length2);
5480
+ return Series.fromArray(bars, result);
5481
+ }
5482
+ function swma2(source) {
5483
+ const bars = source.bars;
5484
+ const result = swma(source.toArray());
5485
+ return Series.fromArray(bars, result);
5486
+ }
5487
+ function correlation2(source1, source2, length2) {
5488
+ const bars = source1.bars;
5489
+ const result = correlation(source1.toArray(), source2.toArray(), length2);
5490
+ return Series.fromArray(bars, result);
5491
+ }
5492
+ function percentrank3(source, length2) {
5493
+ const bars = source.bars;
5494
+ const result = percentrank(source.toArray(), length2);
5495
+ return Series.fromArray(bars, result);
5496
+ }
5497
+ function mfi2(source, length2, volume) {
5498
+ const bars = source.bars;
5499
+ const result = mfi(source.toArray(), length2, volume.toArray());
5500
+ return Series.fromArray(bars, result);
5501
+ }
5502
+ function hma2(source, length2) {
5503
+ const bars = source.bars;
5504
+ const result = hma(source.toArray(), length2);
5505
+ return Series.fromArray(bars, result);
5506
+ }
5507
+ function pivothigh2(source, leftbars, rightbars) {
5508
+ const bars = source.bars;
5509
+ const result = pivothigh(source.toArray(), leftbars, rightbars);
5510
+ return Series.fromArray(bars, result);
5511
+ }
5512
+ function pivotlow2(source, leftbars, rightbars) {
5513
+ const bars = source.bars;
5514
+ const result = pivotlow(source.toArray(), leftbars, rightbars);
5515
+ return Series.fromArray(bars, result);
5516
+ }
5517
+ function barssince2(condition) {
5518
+ const bars = condition.bars;
5519
+ const boolValues = condition.toArray().map((v) => v === 1);
5520
+ const result = barssince(boolValues);
5521
+ return Series.fromArray(bars, result);
5522
+ }
5523
+ function valuewhen2(condition, source, occurrence) {
5524
+ const bars = condition.bars;
5525
+ const boolValues = condition.toArray().map((v) => v === 1);
5526
+ const result = valuewhen(boolValues, source.toArray(), occurrence);
5527
+ return Series.fromArray(bars, result);
5528
+ }
5529
+ function dmi2(bars, diLength, adxSmoothing) {
5530
+ const high = bars.map((b2) => b2.high);
5531
+ const low = bars.map((b2) => b2.low);
5532
+ const close = bars.map((b2) => b2.close);
5533
+ const [plusDI, minusDI, adx] = dmi(diLength, adxSmoothing, high, low, close);
5534
+ return [
5535
+ Series.fromArray(bars, plusDI),
5536
+ Series.fromArray(bars, minusDI),
5537
+ Series.fromArray(bars, adx)
5538
+ ];
5539
+ }
5540
+ function tsi2(source, shortLength, longLength) {
5541
+ const bars = source.bars;
5542
+ const result = tsi(source.toArray(), shortLength, longLength);
5543
+ return Series.fromArray(bars, result);
5544
+ }
5545
+ function cmo2(source, length2) {
5546
+ const bars = source.bars;
5547
+ const result = cmo(source.toArray(), length2);
5548
+ return Series.fromArray(bars, result);
5549
+ }
5550
+ function kc2(bars, source, length2, mult2, useTrueRange = true) {
5411
5551
  const high = bars.map((b2) => b2.high);
5412
5552
  const low = bars.map((b2) => b2.low);
5413
5553
  const close = bars.map((b2) => b2.close);
5414
- const result = sar(start, inc, max5, high, low, close);
5554
+ const [middle, upper2, lower2] = kc(source.toArray(), length2, mult2, useTrueRange, high, low, close);
5555
+ return [
5556
+ Series.fromArray(bars, middle),
5557
+ Series.fromArray(bars, upper2),
5558
+ Series.fromArray(bars, lower2)
5559
+ ];
5560
+ }
5561
+ function bbw2(source, length2, mult2) {
5562
+ const bars = source.bars;
5563
+ const result = bbw(source.toArray(), length2, mult2);
5564
+ return Series.fromArray(bars, result);
5565
+ }
5566
+ function wpr2(bars, length2 = 14) {
5567
+ const high = bars.map((b2) => b2.high);
5568
+ const low = bars.map((b2) => b2.low);
5569
+ const close = bars.map((b2) => b2.close);
5570
+ const result = wpr(high, low, close, length2);
5571
+ return Series.fromArray(bars, result);
5572
+ }
5573
+ function kcw2(bars, source, length2 = 20, mult2 = 2, useTrueRange = true) {
5574
+ const high = bars.map((b2) => b2.high);
5575
+ const low = bars.map((b2) => b2.low);
5576
+ const close = bars.map((b2) => b2.close);
5577
+ const result = kcw(source.toArray(), length2, mult2, useTrueRange, high, low, close);
5578
+ return Series.fromArray(bars, result);
5579
+ }
5580
+ function range3(high, low) {
5581
+ const bars = high.bars;
5582
+ const result = range(high.toArray(), low.toArray());
5583
+ return Series.fromArray(bars, result);
5584
+ }
5585
+ function highestbars2(source, length2) {
5586
+ const bars = source.bars;
5587
+ const result = highestbars(source.toArray(), length2);
5588
+ return Series.fromArray(bars, result);
5589
+ }
5590
+ function lowestbars2(source, length2) {
5591
+ const bars = source.bars;
5592
+ const result = lowestbars(source.toArray(), length2);
5593
+ return Series.fromArray(bars, result);
5594
+ }
5595
+ function max5(source1, source2) {
5596
+ const bars = source1.bars;
5597
+ const result = max(source1.toArray(), source2.toArray());
5598
+ return Series.fromArray(bars, result);
5599
+ }
5600
+ function min5(source1, source2) {
5601
+ const bars = source1.bars;
5602
+ const result = min(source1.toArray(), source2.toArray());
5603
+ return Series.fromArray(bars, result);
5604
+ }
5605
+ function cog2(source, length2 = 10) {
5606
+ const bars = source.bars;
5607
+ const result = cog(source.toArray(), length2);
5608
+ return Series.fromArray(bars, result);
5609
+ }
5610
+ function mode4(source, length2) {
5611
+ const bars = source.bars;
5612
+ const result = mode(source.toArray(), length2);
5613
+ return Series.fromArray(bars, result);
5614
+ }
5615
+ function percentile_linear_interpolation3(source, length2, percentage) {
5616
+ const bars = source.bars;
5617
+ const result = percentile_linear_interpolation(source.toArray(), length2, percentage);
5618
+ return Series.fromArray(bars, result);
5619
+ }
5620
+ function percentile_nearest_rank3(source, length2, percentage) {
5621
+ const bars = source.bars;
5622
+ const result = percentile_nearest_rank(source.toArray(), length2, percentage);
5623
+ return Series.fromArray(bars, result);
5624
+ }
5625
+ function rci2(source, length2) {
5626
+ const bars = source.bars;
5627
+ const result = rci(source.toArray(), length2);
5415
5628
  return Series.fromArray(bars, result);
5416
5629
  }
5417
5630
  var ta = {
@@ -5445,7 +5658,36 @@ var ta = {
5445
5658
  alma: alma2,
5446
5659
  zigzag: zigzag2,
5447
5660
  cci: cci2,
5448
- sar: sar2
5661
+ sar: sar2,
5662
+ dev: dev2,
5663
+ variance: variance3,
5664
+ median: median4,
5665
+ swma: swma2,
5666
+ correlation: correlation2,
5667
+ percentrank: percentrank3,
5668
+ mfi: mfi2,
5669
+ hma: hma2,
5670
+ pivothigh: pivothigh2,
5671
+ pivotlow: pivotlow2,
5672
+ barssince: barssince2,
5673
+ valuewhen: valuewhen2,
5674
+ dmi: dmi2,
5675
+ tsi: tsi2,
5676
+ cmo: cmo2,
5677
+ kc: kc2,
5678
+ bbw: bbw2,
5679
+ wpr: wpr2,
5680
+ kcw: kcw2,
5681
+ range: range3,
5682
+ highestbars: highestbars2,
5683
+ lowestbars: lowestbars2,
5684
+ max: max5,
5685
+ min: min5,
5686
+ cog: cog2,
5687
+ mode: mode4,
5688
+ percentile_linear_interpolation: percentile_linear_interpolation3,
5689
+ percentile_nearest_rank: percentile_nearest_rank3,
5690
+ rci: rci2
5449
5691
  };
5450
5692
 
5451
5693
  // src/utils/index.ts
@@ -5660,9 +5902,9 @@ var ZigZag = class {
5660
5902
  return true;
5661
5903
  }
5662
5904
  } else {
5663
- const dev2 = this.calcDev(last2.end.price, point.price);
5905
+ const dev3 = this.calcDev(last2.end.price, point.price);
5664
5906
  const threshold = this.settings.devThreshold;
5665
- const meetsThreshold = last2.isHigh ? dev2 <= -threshold : dev2 >= threshold;
5907
+ const meetsThreshold = last2.isHigh ? dev3 <= -threshold : dev3 >= threshold;
5666
5908
  if (meetsThreshold) {
5667
5909
  this.pivots.push({
5668
5910
  isHigh,
@@ -6393,7 +6635,7 @@ var SimpleInputAdapter = class {
6393
6635
  };
6394
6636
 
6395
6637
  // src/index.ts
6396
- var VERSION = "0.3.0";
6638
+ var VERSION = "0.2.2";
6397
6639
  var info = {
6398
6640
  name: "OakScriptJS",
6399
6641
  version: VERSION,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ta/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAO,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAsBrH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAkBpE;AAwBD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAwCpE;AA2BD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CA6BpE;AAyBD,wBAAgB,IAAI,CAClB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,YAA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,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAiDrE;AA4BD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,GACjB,YAAY,CA0Cd;AA4BD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,GACjB,YAAY,CA2Cd;AA8BD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAwFpE;AA+BD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,YAAY,GAAG,MAAM,EAC3B,MAAM,EAAE,WAAW,EACnB,UAAU,GAAE,WAAW,GAAG,OAAe,EACzC,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,GACZ,YAAY,EAAE,CAiEhB;AAoJD,wBAAgB,QAAQ,CACtB,iBAAiB,EAAE,UAAU,EAC7B,WAAW,EAAE,UAAU,EACvB,mBAAmB,EAAE,UAAU,EAC/B,YAAY,EAAE,UAAU,EACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAmExE;AAwCD,wBAAgB,MAAM,CACpB,SAAS,GAAE,YAAkB,EAC7B,KAAK,GAAE,UAAe,EACtB,QAAQ,GAAE,UAAc,EACxB,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,YAAY,EAAE,UAAU,EAAE,WAAW,CAAC,CAwNzC"}
@@ -31,6 +31,35 @@ export declare function alma(source: Series, length?: number, offset?: number, s
31
31
  export declare function zigzag(bars: Bar[], deviation?: number, depth?: number, backstep?: number): [Series, Series, Series];
32
32
  export declare function cci(source: Series, length: number): Series;
33
33
  export declare function sar(bars: Bar[], start?: number, inc?: number, max?: number): Series;
34
+ export declare function dev(source: Series, length: number): Series;
35
+ export declare function variance(source: Series, length: number, biased?: boolean): Series;
36
+ export declare function median(source: Series, length: number): Series;
37
+ export declare function swma(source: Series): Series;
38
+ export declare function correlation(source1: Series, source2: Series, length: number): Series;
39
+ export declare function percentrank(source: Series, length: number): Series;
40
+ export declare function mfi(source: Series, length: number, volume: Series): Series;
41
+ export declare function hma(source: Series, length: number): Series;
42
+ export declare function pivothigh(source: Series, leftbars: number, rightbars: number): Series;
43
+ export declare function pivotlow(source: Series, leftbars: number, rightbars: number): Series;
44
+ export declare function barssince(condition: Series): Series;
45
+ export declare function valuewhen(condition: Series, source: Series, occurrence: number): Series;
46
+ export declare function dmi(bars: Bar[], diLength: number, adxSmoothing: number): [Series, Series, Series];
47
+ export declare function tsi(source: Series, shortLength: number, longLength: number): Series;
48
+ export declare function cmo(source: Series, length: number): Series;
49
+ export declare function kc(bars: Bar[], source: Series, length: number, mult: number, useTrueRange?: boolean): [Series, Series, Series];
50
+ export declare function bbw(source: Series, length: number, mult: number): Series;
51
+ export declare function wpr(bars: Bar[], length?: number): Series;
52
+ export declare function kcw(bars: Bar[], source: Series, length?: number, mult?: number, useTrueRange?: boolean): Series;
53
+ export declare function range(high: Series, low: Series): Series;
54
+ export declare function highestbars(source: Series, length: number): Series;
55
+ export declare function lowestbars(source: Series, length: number): Series;
56
+ export declare function max(source1: Series, source2: Series): Series;
57
+ export declare function min(source1: Series, source2: Series): Series;
58
+ export declare function cog(source: Series, length?: number): Series;
59
+ export declare function mode(source: Series, length: number): Series;
60
+ export declare function percentile_linear_interpolation(source: Series, length: number, percentage: number): Series;
61
+ export declare function percentile_nearest_rank(source: Series, length: number, percentage: number): Series;
62
+ export declare function rci(source: Series, length: number): Series;
34
63
  export declare const ta: {
35
64
  sma: typeof sma;
36
65
  ema: typeof ema;
@@ -63,5 +92,34 @@ export declare const ta: {
63
92
  zigzag: typeof zigzag;
64
93
  cci: typeof cci;
65
94
  sar: typeof sar;
95
+ dev: typeof dev;
96
+ variance: typeof variance;
97
+ median: typeof median;
98
+ swma: typeof swma;
99
+ correlation: typeof correlation;
100
+ percentrank: typeof percentrank;
101
+ mfi: typeof mfi;
102
+ hma: typeof hma;
103
+ pivothigh: typeof pivothigh;
104
+ pivotlow: typeof pivotlow;
105
+ barssince: typeof barssince;
106
+ valuewhen: typeof valuewhen;
107
+ dmi: typeof dmi;
108
+ tsi: typeof tsi;
109
+ cmo: typeof cmo;
110
+ kc: typeof kc;
111
+ bbw: typeof bbw;
112
+ wpr: typeof wpr;
113
+ kcw: typeof kcw;
114
+ range: typeof range;
115
+ highestbars: typeof highestbars;
116
+ lowestbars: typeof lowestbars;
117
+ max: typeof max;
118
+ min: typeof min;
119
+ cog: typeof cog;
120
+ mode: typeof mode;
121
+ percentile_linear_interpolation: typeof percentile_linear_interpolation;
122
+ percentile_nearest_rank: typeof percentile_nearest_rank;
123
+ rci: typeof rci;
66
124
  };
67
125
  //# sourceMappingURL=ta-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ta-series.d.ts","sourceRoot":"","sources":["../src/ta-series.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAQnC,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1D;AAQD,wBAAgB,GAAG,CAAC,MAAM,EAAE,MA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C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oakscriptjs",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "PineScript v6 compatible technical analysis library for JavaScript/TypeScript",
6
6
  "main": "dist/index.js",