ohlcv-indicators 3.2.7 → 3.2.9

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.
@@ -95,7 +95,7 @@ var OHLCV_INDICATORS;
95
95
  t.r(e),
96
96
  // EXPORTS
97
97
  t.d(e, {
98
- default: () => /* binding */ Lr
98
+ default: () => /* binding */ Ur
99
99
  });
100
100
  var o = function(t) {
101
101
  return "string" == typeof t && /^\d{4}-\d{2}-\d{2}/.test(t);
@@ -198,7 +198,7 @@ var OHLCV_INDICATORS;
198
198
  if (!n[0]) return t.s = i, t.c = [ t.e = 0 ], t;
199
199
  var l, c, f, y, v, d = o.slice(), m = l = o.length, g = n.length, w = n.slice(0, l), // remainder
200
200
  O = w.length, S = t, // quotient
201
- _ = S.c = [], j = 0, P = u + (S.e = e.e - t.e) + 1;
201
+ j = S.c = [], _ = 0, P = u + (S.e = e.e - t.e) + 1;
202
202
  // precision of the result
203
203
  // Add zeros to make remainder as long as divisor.
204
204
  for (S.s = i, i = P < 0 ? 0 : P,
@@ -226,16 +226,16 @@ var OHLCV_INDICATORS;
226
226
  for (;!w[0]; ) w.shift();
227
227
  }
228
228
  // Add the digit n to the result array.
229
- _[j++] = y ? f : ++f,
229
+ j[_++] = y ? f : ++f,
230
230
  // Update the remainder.
231
231
  w[0] && y ? w[O] = n[m] || 0 : w = [ n[m] ];
232
232
  } while ((m++ < g || w[0] !== p) && i--);
233
233
  // Leading zero? Do not remove if result is simply zero (qi == 1).
234
- return _[0] || 1 == j || (
234
+ return j[0] || 1 == _ || (
235
235
  // There can't be more than one zero.
236
- _.shift(), S.e--, P--),
236
+ j.shift(), S.e--, P--),
237
237
  // Round?
238
- j > P && b(S, P, r.RM, w[0] !== p), S;
238
+ _ > P && b(S, P, r.RM, w[0] !== p), S;
239
239
  },
240
240
  /*
241
241
  * Return true if the value of this Big is equal to the value of Big y, otherwise return false.
@@ -622,7 +622,7 @@ var OHLCV_INDICATORS;
622
622
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
623
623
  return t;
624
624
  }(t);
625
- }(t, _() ? Reflect.construct(e, r || [], P(t).constructor) : e.apply(t, r));
625
+ }(t, j() ? Reflect.construct(e, r || [], P(t).constructor) : e.apply(t, r));
626
626
  }
627
627
  function S(t) {
628
628
  var e = "function" == typeof Map ? new Map : void 0;
@@ -641,11 +641,11 @@ var OHLCV_INDICATORS;
641
641
  }
642
642
  function r() {
643
643
  return function(t, e, r) {
644
- if (_()) return Reflect.construct.apply(null, arguments);
644
+ if (j()) return Reflect.construct.apply(null, arguments);
645
645
  var n = [ null ];
646
646
  n.push.apply(n, e);
647
647
  var o = new (t.bind.apply(t, n));
648
- return r && j(o, r.prototype), o;
648
+ return r && _(o, r.prototype), o;
649
649
  }(t, arguments, P(this).constructor);
650
650
  }
651
651
  return r.prototype = Object.create(t.prototype, {
@@ -655,21 +655,21 @@ var OHLCV_INDICATORS;
655
655
  writable: !0,
656
656
  configurable: !0
657
657
  }
658
- }), j(r, t);
658
+ }), _(r, t);
659
659
  }, S(t);
660
660
  }
661
- function _() {
661
+ function j() {
662
662
  try {
663
663
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
664
664
  } catch (t) {}
665
- return (_ = function() {
665
+ return (j = function() {
666
666
  return !!t;
667
667
  })();
668
668
  }
669
- function j(t, e) {
670
- return j = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
669
+ function _(t, e) {
670
+ return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
671
671
  return t.__proto__ = e, t;
672
- }, j(t, e);
672
+ }, _(t, e);
673
673
  }
674
674
  function P(t) {
675
675
  return P = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
@@ -694,7 +694,7 @@ var OHLCV_INDICATORS;
694
694
  }
695
695
  }), Object.defineProperty(t, "prototype", {
696
696
  writable: !1
697
- }), e && j(t, e);
697
+ }), e && _(t, e);
698
698
  }(e, t), r = e, n && g(r.prototype, n), o && g(r, o), Object.defineProperty(r, "prototype", {
699
699
  writable: !1
700
700
  }), r;
@@ -744,7 +744,7 @@ var OHLCV_INDICATORS;
744
744
  }(t, "string");
745
745
  return "symbol" == E(e) ? e : e + "";
746
746
  }
747
- var R = function() {
747
+ var C = function() {
748
748
  return k((function t() {
749
749
  M(this, t), T(this, "previousHighest", void 0), T(this, "highest", void 0), T(this, "previousLowest", void 0),
750
750
  T(this, "lowest", void 0), T(this, "previousResult", void 0), T(this, "result", void 0);
@@ -776,12 +776,12 @@ var OHLCV_INDICATORS;
776
776
  } ]);
777
777
  }();
778
778
  // ./node_modules/trading-signals/dist/MA/MovingAverage.js
779
- function C(t) {
780
- return C = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
779
+ function R(t) {
780
+ return R = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
781
781
  return typeof t;
782
782
  } : function(t) {
783
783
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
784
- }, C(t);
784
+ }, R(t);
785
785
  }
786
786
  function D(t, e) {
787
787
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
@@ -800,7 +800,7 @@ var OHLCV_INDICATORS;
800
800
  }
801
801
  function N(t, e, r) {
802
802
  return e = H(e), function(t, e) {
803
- if (e && ("object" == C(e) || "function" == typeof e)) return e;
803
+ if (e && ("object" == R(e) || "function" == typeof e)) return e;
804
804
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
805
805
  return function(t) {
806
806
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -848,16 +848,16 @@ var OHLCV_INDICATORS;
848
848
  }
849
849
  function $(t) {
850
850
  var e = function(t, e) {
851
- if ("object" != C(t) || !t) return t;
851
+ if ("object" != R(t) || !t) return t;
852
852
  var r = t[Symbol.toPrimitive];
853
853
  if (void 0 !== r) {
854
854
  var n = r.call(t, e || "default");
855
- if ("object" != C(n)) return n;
855
+ if ("object" != R(n)) return n;
856
856
  throw new TypeError("@@toPrimitive must return a primitive value.");
857
857
  }
858
858
  return ("string" === e ? String : Number)(t);
859
859
  }(t, "string");
860
- return "symbol" == C(e) ? e : e + "";
860
+ return "symbol" == R(e) ? e : e + "";
861
861
  }
862
862
  var F = function(t) {
863
863
  function e(t) {
@@ -878,7 +878,7 @@ var OHLCV_INDICATORS;
878
878
  return this.update(t, !0);
879
879
  }
880
880
  } ]);
881
- }(R);
881
+ }(C);
882
882
  // ./node_modules/trading-signals/dist/SMA/SMA.js
883
883
  function K(t) {
884
884
  return K = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
@@ -1098,7 +1098,7 @@ var OHLCV_INDICATORS;
1098
1098
  if (void 0 === this.result && void 0 !== r) return this.setResult(r, e);
1099
1099
  }
1100
1100
  } ]);
1101
- }(R);
1101
+ }(C);
1102
1102
  function bt(t) {
1103
1103
  return t.length ? t.reduce((function(t, e) {
1104
1104
  return t + e;
@@ -1148,7 +1148,7 @@ var OHLCV_INDICATORS;
1148
1148
  }(t, "string");
1149
1149
  return "symbol" == dt(e) ? e : e + "";
1150
1150
  }
1151
- var _t = function() {
1151
+ var jt = function() {
1152
1152
  return wt((function t(e) {
1153
1153
  var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2;
1154
1154
  mt(this, t), Ot(this, "interval", void 0), Ot(this, "deviationMultiplier", void 0),
@@ -1187,12 +1187,12 @@ var OHLCV_INDICATORS;
1187
1187
  } ]);
1188
1188
  }();
1189
1189
  // ./node_modules/trading-signals/dist/EMA/EMA.js
1190
- function jt(t) {
1191
- return jt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1190
+ function _t(t) {
1191
+ return _t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1192
1192
  return typeof t;
1193
1193
  } : function(t) {
1194
1194
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1195
- }, jt(t);
1195
+ }, _t(t);
1196
1196
  }
1197
1197
  function Pt(t, e) {
1198
1198
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
@@ -1201,7 +1201,7 @@ var OHLCV_INDICATORS;
1201
1201
  for (var r = 0; r < e.length; r++) {
1202
1202
  var n = e[r];
1203
1203
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
1204
- Object.defineProperty(t, Ct(n.key), n);
1204
+ Object.defineProperty(t, Rt(n.key), n);
1205
1205
  }
1206
1206
  }
1207
1207
  function Et(t, e, r) {
@@ -1211,7 +1211,7 @@ var OHLCV_INDICATORS;
1211
1211
  }
1212
1212
  function Mt(t, e, r) {
1213
1213
  return e = kt(e), function(t, e) {
1214
- if (e && ("object" == jt(e) || "function" == typeof e)) return e;
1214
+ if (e && ("object" == _t(e) || "function" == typeof e)) return e;
1215
1215
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
1216
1216
  return function(t) {
1217
1217
  if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
@@ -1249,32 +1249,32 @@ var OHLCV_INDICATORS;
1249
1249
  return t.__proto__ = e, t;
1250
1250
  }, It(t, e);
1251
1251
  }
1252
- function Rt(t, e, r) {
1253
- return (e = Ct(e)) in t ? Object.defineProperty(t, e, {
1252
+ function Ct(t, e, r) {
1253
+ return (e = Rt(e)) in t ? Object.defineProperty(t, e, {
1254
1254
  value: r,
1255
1255
  enumerable: !0,
1256
1256
  configurable: !0,
1257
1257
  writable: !0
1258
1258
  }) : t[e] = r, t;
1259
1259
  }
1260
- function Ct(t) {
1260
+ function Rt(t) {
1261
1261
  var e = function(t, e) {
1262
- if ("object" != jt(t) || !t) return t;
1262
+ if ("object" != _t(t) || !t) return t;
1263
1263
  var r = t[Symbol.toPrimitive];
1264
1264
  if (void 0 !== r) {
1265
1265
  var n = r.call(t, e || "default");
1266
- if ("object" != jt(n)) return n;
1266
+ if ("object" != _t(n)) return n;
1267
1267
  throw new TypeError("@@toPrimitive must return a primitive value.");
1268
1268
  }
1269
1269
  return ("string" === e ? String : Number)(t);
1270
1270
  }(t, "string");
1271
- return "symbol" == jt(e) ? e : e + "";
1271
+ return "symbol" == _t(e) ? e : e + "";
1272
1272
  }
1273
1273
  var Dt = function(t) {
1274
1274
  function e(t) {
1275
1275
  var r;
1276
- return Pt(this, e), Rt(r = Mt(this, e, [ t ]), "interval", void 0), Rt(r, "pricesCounter", 0),
1277
- Rt(r, "weightFactor", void 0), r.interval = t, r.weightFactor = 2 / (r.interval + 1),
1276
+ return Pt(this, e), Ct(r = Mt(this, e, [ t ]), "interval", void 0), Ct(r, "pricesCounter", 0),
1277
+ Ct(r, "weightFactor", void 0), r.interval = t, r.weightFactor = 2 / (r.interval + 1),
1278
1278
  r;
1279
1279
  }
1280
1280
  return Tt(e, t), Et(e, [ {
@@ -1486,7 +1486,7 @@ var OHLCV_INDICATORS;
1486
1486
  }
1487
1487
  }
1488
1488
  } ]);
1489
- }(R);
1489
+ }(C);
1490
1490
  // ./src/utilities/numberUtilities.js
1491
1491
  function ee(t, e) {
1492
1492
  return function(t) {
@@ -1587,19 +1587,28 @@ var OHLCV_INDICATORS;
1587
1587
  if (null == t || null == e) return null;
1588
1588
  var o = t >= 0, i = Math.abs(t), a = e.upper, u = e.lower, l = ne((i - u) / (a - u), r);
1589
1589
  return 0 === l ? o ? .01 : -.01 : n ? o ? Math.min(l, 1) : Math.max(-l, -1) : o ? l : -l;
1590
+ }, se = function(t, e, r, n, o) {
1591
+ if (o ? t[e][t[e].length - 1] = n : t[e].push(n), t[e].length > r && t[e].shift(),
1592
+ t.length < r) return null;
1593
+ var i = t[e].reduce((function(t, e) {
1594
+ return t + e;
1595
+ }), 0) / r, a = Math.sqrt(t[e].reduce((function(t, e) {
1596
+ return t + Math.pow(e - i, 2);
1597
+ }), 0) / r);
1598
+ return (n - i) / a;
1590
1599
  };
1591
1600
  // ./src/moving-averages/movingAverages.js
1592
- function se(t) {
1593
- return se = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1601
+ function fe(t) {
1602
+ return fe = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1594
1603
  return typeof t;
1595
1604
  } : function(t) {
1596
1605
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1597
- }, se(t);
1606
+ }, fe(t);
1598
1607
  }
1599
- function fe(t, e) {
1608
+ function he(t, e) {
1600
1609
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1601
1610
  if (!r) {
1602
- if (Array.isArray(t) || (r = ye(t)) || e && t && "number" == typeof t.length) {
1611
+ if (Array.isArray(t) || (r = pe(t)) || e && t && "number" == typeof t.length) {
1603
1612
  r && (t = r);
1604
1613
  var n = 0, o = function() {};
1605
1614
  return {
@@ -1641,32 +1650,52 @@ var OHLCV_INDICATORS;
1641
1650
  }
1642
1651
  };
1643
1652
  }
1644
- function he(t) {
1653
+ function ye(t) {
1645
1654
  return function(t) {
1646
- if (Array.isArray(t)) return pe(t);
1655
+ if (Array.isArray(t)) return ve(t);
1647
1656
  }(t) || function(t) {
1648
1657
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1649
- }(t) || ye(t) || function() {
1658
+ }(t) || pe(t) || function() {
1650
1659
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1651
1660
  }();
1652
1661
  }
1653
- function ye(t, e) {
1662
+ function pe(t, e) {
1654
1663
  if (t) {
1655
- if ("string" == typeof t) return pe(t, e);
1664
+ if ("string" == typeof t) return ve(t, e);
1656
1665
  var r = {}.toString.call(t).slice(8, -1);
1657
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? pe(t, e) : void 0;
1666
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ve(t, e) : void 0;
1658
1667
  }
1659
1668
  }
1660
- function pe(t, e) {
1669
+ function ve(t, e) {
1661
1670
  (null == e || e > t.length) && (e = t.length);
1662
1671
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1663
1672
  return n;
1664
1673
  }
1665
- var ve = {
1674
+ function be(t, e, r) {
1675
+ return (e = function(t) {
1676
+ var e = function(t, e) {
1677
+ if ("object" != fe(t) || !t) return t;
1678
+ var r = t[Symbol.toPrimitive];
1679
+ if (void 0 !== r) {
1680
+ var n = r.call(t, e || "default");
1681
+ if ("object" != fe(n)) return n;
1682
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1683
+ }
1684
+ return ("string" === e ? String : Number)(t);
1685
+ }(t, "string");
1686
+ return "symbol" == fe(e) ? e : e + "";
1687
+ }(e)) in t ? Object.defineProperty(t, e, {
1688
+ value: r,
1689
+ enumerable: !0,
1690
+ configurable: !0,
1691
+ writable: !0
1692
+ }) : t[e] = r, t;
1693
+ }
1694
+ var de = {
1666
1695
  ema: Dt,
1667
1696
  sma: nt
1668
- }, be = function(t, e, r, n) {
1669
- if (!r || "object" !== se(r)) throw new Error('"options" must be an object in '.concat(t, ". eg: {target, height, range}"));
1697
+ }, me = function(t, e, r, n) {
1698
+ if (!r || "object" !== fe(r)) throw new Error('"options" must be an object in '.concat(t, ". eg: {target, height, range}"));
1670
1699
  var o = r.target, i = void 0 === o ? "close" : o, a = r.diff, u = void 0 === a ? null : a;
1671
1700
  if ("string" != typeof i) throw new Error('"target" must be a valid keyName '.concat(t, "."));
1672
1701
  if ("number" != typeof e || e <= 0) throw new Error('"size" must be a positive number in '.concat(t, "."));
@@ -1675,7 +1704,7 @@ var OHLCV_INDICATORS;
1675
1704
  target: i,
1676
1705
  diff: null
1677
1706
  };
1678
- if (null !== u && ("object" === se(u) || "boolean" == typeof u && !0 === u)) {
1707
+ if (null !== u && ("object" === fe(u) || "boolean" == typeof u && !0 === u)) {
1679
1708
  var c = u = !0 === u ? {} : u, s = c.stdDev, f = void 0 === s ? 2 : s, h = c.scale, y = void 0 === h ? .05 : h, p = c.targets, v = void 0 === p ? [ "close" ] : p, b = c.size, d = void 0 === b ? e : b, m = c.lag, g = void 0 === m ? 0 : m, w = c.autoMinMax, O = void 0 !== w && w;
1680
1709
  if ("number" != typeof f || f <= 0) throw new Error('"diff.stdDev" must be a number greater than 0 in '.concat(t, "."));
1681
1710
  if ("number" != typeof y || !n.includes(y)) throw new Error('"diff.scale" must be a number between 0.01 and 1 in '.concat(t, "."));
@@ -1695,26 +1724,26 @@ var OHLCV_INDICATORS;
1695
1724
  return l;
1696
1725
  };
1697
1726
  // ./src/moving-averages/macd.js
1698
- function de(t) {
1699
- return de = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1727
+ function ge(t) {
1728
+ return ge = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1700
1729
  return typeof t;
1701
1730
  } : function(t) {
1702
1731
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1703
- }, de(t);
1732
+ }, ge(t);
1704
1733
  }
1705
- function me(t, e, r) {
1734
+ function we(t, e, r) {
1706
1735
  return (e = function(t) {
1707
1736
  var e = function(t, e) {
1708
- if ("object" != de(t) || !t) return t;
1737
+ if ("object" != ge(t) || !t) return t;
1709
1738
  var r = t[Symbol.toPrimitive];
1710
1739
  if (void 0 !== r) {
1711
1740
  var n = r.call(t, e || "default");
1712
- if ("object" != de(n)) return n;
1741
+ if ("object" != ge(n)) return n;
1713
1742
  throw new TypeError("@@toPrimitive must return a primitive value.");
1714
1743
  }
1715
1744
  return ("string" === e ? String : Number)(t);
1716
1745
  }(t, "string");
1717
- return "symbol" == de(e) ? e : e + "";
1746
+ return "symbol" == ge(e) ? e : e + "";
1718
1747
  }(e)) in t ? Object.defineProperty(t, e, {
1719
1748
  value: r,
1720
1749
  enumerable: !0,
@@ -1722,57 +1751,57 @@ var OHLCV_INDICATORS;
1722
1751
  writable: !0
1723
1752
  }) : t[e] = r, t;
1724
1753
  }
1725
- function ge(t) {
1754
+ function Oe(t) {
1726
1755
  return function(t) {
1727
- if (Array.isArray(t)) return we(t);
1756
+ if (Array.isArray(t)) return Se(t);
1728
1757
  }(t) || function(t) {
1729
1758
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1730
1759
  }(t) || function(t, e) {
1731
1760
  if (t) {
1732
- if ("string" == typeof t) return we(t, e);
1761
+ if ("string" == typeof t) return Se(t, e);
1733
1762
  var r = {}.toString.call(t).slice(8, -1);
1734
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? we(t, e) : void 0;
1763
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Se(t, e) : void 0;
1735
1764
  }
1736
1765
  }(t) || function() {
1737
1766
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1738
1767
  }();
1739
1768
  }
1740
- function we(t, e) {
1769
+ function Se(t, e) {
1741
1770
  (null == e || e > t.length) && (e = t.length);
1742
1771
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1743
1772
  return n;
1744
1773
  }
1745
- var Oe = "close";
1774
+ var je = "close";
1746
1775
  // ./src/moving-averages/relativeVolume.js
1747
- function Se(t) {
1776
+ function _e(t) {
1748
1777
  return function(t) {
1749
- if (Array.isArray(t)) return _e(t);
1778
+ if (Array.isArray(t)) return Pe(t);
1750
1779
  }(t) || function(t) {
1751
1780
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1752
1781
  }(t) || function(t, e) {
1753
1782
  if (t) {
1754
- if ("string" == typeof t) return _e(t, e);
1783
+ if ("string" == typeof t) return Pe(t, e);
1755
1784
  var r = {}.toString.call(t).slice(8, -1);
1756
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? _e(t, e) : void 0;
1785
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Pe(t, e) : void 0;
1757
1786
  }
1758
1787
  }(t) || function() {
1759
1788
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1760
1789
  }();
1761
1790
  }
1762
- function _e(t, e) {
1791
+ function Pe(t, e) {
1763
1792
  (null == e || e > t.length) && (e = t.length);
1764
1793
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1765
1794
  return n;
1766
1795
  }
1767
1796
  // ./src/moving-averages/donchianChannel.js
1768
- function je(t) {
1769
- return je = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1797
+ function Ae(t) {
1798
+ return Ae = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1770
1799
  return typeof t;
1771
1800
  } : function(t) {
1772
1801
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1773
- }, je(t);
1802
+ }, Ae(t);
1774
1803
  }
1775
- function Pe(t, e) {
1804
+ function Ee(t, e) {
1776
1805
  var r = Object.keys(t);
1777
1806
  if (Object.getOwnPropertySymbols) {
1778
1807
  var n = Object.getOwnPropertySymbols(t);
@@ -1782,19 +1811,19 @@ var OHLCV_INDICATORS;
1782
1811
  }
1783
1812
  return r;
1784
1813
  }
1785
- function Ae(t, e, r) {
1814
+ function Me(t, e, r) {
1786
1815
  return (e = function(t) {
1787
1816
  var e = function(t, e) {
1788
- if ("object" != je(t) || !t) return t;
1817
+ if ("object" != Ae(t) || !t) return t;
1789
1818
  var r = t[Symbol.toPrimitive];
1790
1819
  if (void 0 !== r) {
1791
1820
  var n = r.call(t, e || "default");
1792
- if ("object" != je(n)) return n;
1821
+ if ("object" != Ae(n)) return n;
1793
1822
  throw new TypeError("@@toPrimitive must return a primitive value.");
1794
1823
  }
1795
1824
  return ("string" === e ? String : Number)(t);
1796
1825
  }(t, "string");
1797
- return "symbol" == je(e) ? e : e + "";
1826
+ return "symbol" == Ae(e) ? e : e + "";
1798
1827
  }(e)) in t ? Object.defineProperty(t, e, {
1799
1828
  value: r,
1800
1829
  enumerable: !0,
@@ -1802,19 +1831,19 @@ var OHLCV_INDICATORS;
1802
1831
  writable: !0
1803
1832
  }) : t[e] = r, t;
1804
1833
  }
1805
- function Ee(t) {
1834
+ function xe(t) {
1806
1835
  return function(t) {
1807
- if (Array.isArray(t)) return ke(t);
1836
+ if (Array.isArray(t)) return Ie(t);
1808
1837
  }(t) || function(t) {
1809
1838
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1810
- }(t) || xe(t) || function() {
1839
+ }(t) || Te(t) || function() {
1811
1840
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1812
1841
  }();
1813
1842
  }
1814
- function Me(t, e) {
1843
+ function ke(t, e) {
1815
1844
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1816
1845
  if (!r) {
1817
- if (Array.isArray(t) || (r = xe(t)) || e && t && "number" == typeof t.length) {
1846
+ if (Array.isArray(t) || (r = Te(t)) || e && t && "number" == typeof t.length) {
1818
1847
  r && (t = r);
1819
1848
  var n = 0, o = function() {};
1820
1849
  return {
@@ -1856,27 +1885,27 @@ var OHLCV_INDICATORS;
1856
1885
  }
1857
1886
  };
1858
1887
  }
1859
- function xe(t, e) {
1888
+ function Te(t, e) {
1860
1889
  if (t) {
1861
- if ("string" == typeof t) return ke(t, e);
1890
+ if ("string" == typeof t) return Ie(t, e);
1862
1891
  var r = {}.toString.call(t).slice(8, -1);
1863
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ke(t, e) : void 0;
1892
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ie(t, e) : void 0;
1864
1893
  }
1865
1894
  }
1866
- function ke(t, e) {
1895
+ function Ie(t, e) {
1867
1896
  (null == e || e > t.length) && (e = t.length);
1868
1897
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1869
1898
  return n;
1870
1899
  }
1871
1900
  // ./src/moving-averages/bollingerBands.js
1872
- function Te(t) {
1873
- return Te = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1901
+ function Ce(t) {
1902
+ return Ce = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1874
1903
  return typeof t;
1875
1904
  } : function(t) {
1876
1905
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1877
- }, Te(t);
1906
+ }, Ce(t);
1878
1907
  }
1879
- function Ie(t, e) {
1908
+ function Re(t, e) {
1880
1909
  var r = Object.keys(t);
1881
1910
  if (Object.getOwnPropertySymbols) {
1882
1911
  var n = Object.getOwnPropertySymbols(t);
@@ -1886,19 +1915,19 @@ var OHLCV_INDICATORS;
1886
1915
  }
1887
1916
  return r;
1888
1917
  }
1889
- function Re(t, e, r) {
1918
+ function De(t, e, r) {
1890
1919
  return (e = function(t) {
1891
1920
  var e = function(t, e) {
1892
- if ("object" != Te(t) || !t) return t;
1921
+ if ("object" != Ce(t) || !t) return t;
1893
1922
  var r = t[Symbol.toPrimitive];
1894
1923
  if (void 0 !== r) {
1895
1924
  var n = r.call(t, e || "default");
1896
- if ("object" != Te(n)) return n;
1925
+ if ("object" != Ce(n)) return n;
1897
1926
  throw new TypeError("@@toPrimitive must return a primitive value.");
1898
1927
  }
1899
1928
  return ("string" === e ? String : Number)(t);
1900
1929
  }(t, "string");
1901
- return "symbol" == Te(e) ? e : e + "";
1930
+ return "symbol" == Ce(e) ? e : e + "";
1902
1931
  }(e)) in t ? Object.defineProperty(t, e, {
1903
1932
  value: r,
1904
1933
  enumerable: !0,
@@ -1906,19 +1935,19 @@ var OHLCV_INDICATORS;
1906
1935
  writable: !0
1907
1936
  }) : t[e] = r, t;
1908
1937
  }
1909
- function Ce(t) {
1938
+ function Ve(t) {
1910
1939
  return function(t) {
1911
- if (Array.isArray(t)) return Be(t);
1940
+ if (Array.isArray(t)) return Le(t);
1912
1941
  }(t) || function(t) {
1913
1942
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1914
- }(t) || Ve(t) || function() {
1943
+ }(t) || Ne(t) || function() {
1915
1944
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1916
1945
  }();
1917
1946
  }
1918
- function De(t, e) {
1947
+ function Be(t, e) {
1919
1948
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1920
1949
  if (!r) {
1921
- if (Array.isArray(t) || (r = Ve(t)) || e && t && "number" == typeof t.length) {
1950
+ if (Array.isArray(t) || (r = Ne(t)) || e && t && "number" == typeof t.length) {
1922
1951
  r && (t = r);
1923
1952
  var n = 0, o = function() {};
1924
1953
  return {
@@ -1960,48 +1989,48 @@ var OHLCV_INDICATORS;
1960
1989
  }
1961
1990
  };
1962
1991
  }
1963
- function Ve(t, e) {
1992
+ function Ne(t, e) {
1964
1993
  if (t) {
1965
- if ("string" == typeof t) return Be(t, e);
1994
+ if ("string" == typeof t) return Le(t, e);
1966
1995
  var r = {}.toString.call(t).slice(8, -1);
1967
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Be(t, e) : void 0;
1996
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Le(t, e) : void 0;
1968
1997
  }
1969
1998
  }
1970
- function Be(t, e) {
1999
+ function Le(t, e) {
1971
2000
  (null == e || e > t.length) && (e = t.length);
1972
2001
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1973
2002
  return n;
1974
2003
  }
1975
2004
  // ./src/oscillators/volumeOscillator.js
1976
- function Ne(t) {
2005
+ function He(t) {
1977
2006
  return function(t) {
1978
- if (Array.isArray(t)) return Le(t);
2007
+ if (Array.isArray(t)) return Ue(t);
1979
2008
  }(t) || function(t) {
1980
2009
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1981
2010
  }(t) || function(t, e) {
1982
2011
  if (t) {
1983
- if ("string" == typeof t) return Le(t, e);
2012
+ if ("string" == typeof t) return Ue(t, e);
1984
2013
  var r = {}.toString.call(t).slice(8, -1);
1985
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Le(t, e) : void 0;
2014
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ue(t, e) : void 0;
1986
2015
  }
1987
2016
  }(t) || function() {
1988
2017
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1989
2018
  }();
1990
2019
  }
1991
- function Le(t, e) {
2020
+ function Ue(t, e) {
1992
2021
  (null == e || e > t.length) && (e = t.length);
1993
2022
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
1994
2023
  return n;
1995
2024
  }
1996
2025
  // ./src/studies/candleVectors.js
1997
- function He(t) {
1998
- return He = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2026
+ function ze(t) {
2027
+ return ze = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1999
2028
  return typeof t;
2000
2029
  } : function(t) {
2001
2030
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2002
- }, He(t);
2031
+ }, ze(t);
2003
2032
  }
2004
- function Ue(t, e) {
2033
+ function qe(t, e) {
2005
2034
  var r = Object.keys(t);
2006
2035
  if (Object.getOwnPropertySymbols) {
2007
2036
  var n = Object.getOwnPropertySymbols(t);
@@ -2011,30 +2040,30 @@ var OHLCV_INDICATORS;
2011
2040
  }
2012
2041
  return r;
2013
2042
  }
2014
- function ze(t) {
2043
+ function $e(t) {
2015
2044
  for (var e = 1; e < arguments.length; e++) {
2016
2045
  var r = null != arguments[e] ? arguments[e] : {};
2017
- e % 2 ? Ue(Object(r), !0).forEach((function(e) {
2018
- qe(t, e, r[e]);
2019
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ue(Object(r)).forEach((function(e) {
2046
+ e % 2 ? qe(Object(r), !0).forEach((function(e) {
2047
+ Fe(t, e, r[e]);
2048
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : qe(Object(r)).forEach((function(e) {
2020
2049
  Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
2021
2050
  }));
2022
2051
  }
2023
2052
  return t;
2024
2053
  }
2025
- function qe(t, e, r) {
2054
+ function Fe(t, e, r) {
2026
2055
  return (e = function(t) {
2027
2056
  var e = function(t, e) {
2028
- if ("object" != He(t) || !t) return t;
2057
+ if ("object" != ze(t) || !t) return t;
2029
2058
  var r = t[Symbol.toPrimitive];
2030
2059
  if (void 0 !== r) {
2031
2060
  var n = r.call(t, e || "default");
2032
- if ("object" != He(n)) return n;
2061
+ if ("object" != ze(n)) return n;
2033
2062
  throw new TypeError("@@toPrimitive must return a primitive value.");
2034
2063
  }
2035
2064
  return ("string" === e ? String : Number)(t);
2036
2065
  }(t, "string");
2037
- return "symbol" == He(e) ? e : e + "";
2066
+ return "symbol" == ze(e) ? e : e + "";
2038
2067
  }(e)) in t ? Object.defineProperty(t, e, {
2039
2068
  value: r,
2040
2069
  enumerable: !0,
@@ -2042,16 +2071,16 @@ var OHLCV_INDICATORS;
2042
2071
  writable: !0
2043
2072
  }) : t[e] = r, t;
2044
2073
  }
2045
- function $e(t) {
2074
+ function Ke(t) {
2046
2075
  return function(t) {
2047
- if (Array.isArray(t)) return Je(t);
2076
+ if (Array.isArray(t)) return Ye(t);
2048
2077
  }(t) || function(t) {
2049
2078
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2050
- }(t) || Ge(t) || function() {
2079
+ }(t) || We(t) || function() {
2051
2080
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2052
2081
  }();
2053
2082
  }
2054
- function Fe(t, e) {
2083
+ function Ge(t, e) {
2055
2084
  return function(t) {
2056
2085
  if (Array.isArray(t)) return t;
2057
2086
  }(t) || function(t, e) {
@@ -2074,14 +2103,14 @@ var OHLCV_INDICATORS;
2074
2103
  }
2075
2104
  return u;
2076
2105
  }
2077
- }(t, e) || Ge(t, e) || function() {
2106
+ }(t, e) || We(t, e) || function() {
2078
2107
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2079
2108
  }();
2080
2109
  }
2081
- function Ke(t, e) {
2110
+ function Je(t, e) {
2082
2111
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2083
2112
  if (!r) {
2084
- if (Array.isArray(t) || (r = Ge(t)) || e && t && "number" == typeof t.length) {
2113
+ if (Array.isArray(t) || (r = We(t)) || e && t && "number" == typeof t.length) {
2085
2114
  r && (t = r);
2086
2115
  var n = 0, o = function() {};
2087
2116
  return {
@@ -2123,34 +2152,32 @@ var OHLCV_INDICATORS;
2123
2152
  }
2124
2153
  };
2125
2154
  }
2126
- function Ge(t, e) {
2155
+ function We(t, e) {
2127
2156
  if (t) {
2128
- if ("string" == typeof t) return Je(t, e);
2157
+ if ("string" == typeof t) return Ye(t, e);
2129
2158
  var r = {}.toString.call(t).slice(8, -1);
2130
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Je(t, e) : void 0;
2159
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ye(t, e) : void 0;
2131
2160
  }
2132
2161
  }
2133
- function Je(t, e) {
2162
+ function Ye(t, e) {
2134
2163
  (null == e || e > t.length) && (e = t.length);
2135
2164
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2136
2165
  return n;
2137
2166
  }
2138
- var We = function(t, e) {
2139
- return (t - e) / e;
2167
+ var Qe = function(t, e) {
2168
+ return t - e;
2140
2169
  };
2141
- // crear una nueva instancia con la altura porcentual utilizando Bollinger Bands con una desviación estándar de 1.5
2142
- // Las diferencias estarán basadas en (objetivo - lower) / (upper - lower). Esto arrojará un valor entre -1 y 1
2143
- // ./src/studies/lag.js
2144
- function Ye(t) {
2170
+ // ./src/studies/lag.js
2171
+ function Xe(t) {
2145
2172
  return function(t) {
2146
- if (Array.isArray(t)) return tr(t);
2173
+ if (Array.isArray(t)) return rr(t);
2147
2174
  }(t) || function(t) {
2148
2175
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2149
- }(t) || Ze(t) || function() {
2176
+ }(t) || er(t) || function() {
2150
2177
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2151
2178
  }();
2152
2179
  }
2153
- function Qe(t, e) {
2180
+ function Ze(t, e) {
2154
2181
  return function(t) {
2155
2182
  if (Array.isArray(t)) return t;
2156
2183
  }(t) || function(t, e) {
@@ -2173,14 +2200,14 @@ var OHLCV_INDICATORS;
2173
2200
  }
2174
2201
  return u;
2175
2202
  }
2176
- }(t, e) || Ze(t, e) || function() {
2203
+ }(t, e) || er(t, e) || function() {
2177
2204
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2178
2205
  }();
2179
2206
  }
2180
- function Xe(t, e) {
2207
+ function tr(t, e) {
2181
2208
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2182
2209
  if (!r) {
2183
- if (Array.isArray(t) || (r = Ze(t)) || e && t && "number" == typeof t.length) {
2210
+ if (Array.isArray(t) || (r = er(t)) || e && t && "number" == typeof t.length) {
2184
2211
  r && (t = r);
2185
2212
  var n = 0, o = function() {};
2186
2213
  return {
@@ -2222,38 +2249,38 @@ var OHLCV_INDICATORS;
2222
2249
  }
2223
2250
  };
2224
2251
  }
2225
- function Ze(t, e) {
2252
+ function er(t, e) {
2226
2253
  if (t) {
2227
- if ("string" == typeof t) return tr(t, e);
2254
+ if ("string" == typeof t) return rr(t, e);
2228
2255
  var r = {}.toString.call(t).slice(8, -1);
2229
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? tr(t, e) : void 0;
2256
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? rr(t, e) : void 0;
2230
2257
  }
2231
2258
  }
2232
- function tr(t, e) {
2259
+ function rr(t, e) {
2233
2260
  (null == e || e > t.length) && (e = t.length);
2234
2261
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2235
2262
  return n;
2236
2263
  }
2237
- function er(t) {
2238
- return er = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2264
+ function nr(t) {
2265
+ return nr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2239
2266
  return typeof t;
2240
2267
  } : function(t) {
2241
2268
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2242
- }, er(t);
2269
+ }, nr(t);
2243
2270
  }
2244
- var rr = function(t, e) {
2271
+ var or = function(t, e) {
2245
2272
  var r = t.instances, n = t.verticalOhlcv, o = t.nullArray;
2246
2273
  if (0 === e) {
2247
2274
  var i = t.inputParams, a = t.priceBased, u = i.filter((function(t) {
2248
2275
  return "lag" === t.key;
2249
2276
  }));
2250
- if ("object" !== er(u)) return;
2277
+ if ("object" !== nr(u)) return;
2251
2278
  var l, c = u.map((function(t) {
2252
2279
  return t.params;
2253
- })), s = Xe(c);
2280
+ })), s = tr(c);
2254
2281
  try {
2255
2282
  for (s.s(); !(l = s.n()).done; ) {
2256
- var f, h = Qe(l.value, 2), y = h[0], p = h[1], v = Xe(y);
2283
+ var f, h = Ze(l.value, 2), y = h[0], p = h[1], v = tr(y);
2257
2284
  try {
2258
2285
  for (v.s(); !(f = v.n()).done; ) {
2259
2286
  var b = f.value;
@@ -2274,19 +2301,19 @@ var OHLCV_INDICATORS;
2274
2301
  lagParams: c
2275
2302
  };
2276
2303
  }
2277
- var m, g = Xe(r.lag.lagParams);
2304
+ var m, g = tr(r.lag.lagParams);
2278
2305
  try {
2279
2306
  for (g.s(); !(m = g.n()).done; ) {
2280
- var w, O = Qe(m.value, 2), S = O[0], _ = O[1], j = Xe(S);
2307
+ var w, O = Ze(m.value, 2), S = O[0], j = O[1], _ = tr(S);
2281
2308
  try {
2282
- for (j.s(); !(w = j.n()).done; ) {
2309
+ for (_.s(); !(w = _.n()).done; ) {
2283
2310
  var P = w.value, A = n[P];
2284
2311
  // Initialize lagged arrays only on the first index
2285
- if (0 === e) for (var E = 1; E <= _; E++) {
2286
- n["".concat(P, "_lag_").concat(E)] = Ye(o);
2312
+ if (0 === e) for (var E = 1; E <= j; E++) {
2313
+ n["".concat(P, "_lag_").concat(E)] = Xe(o);
2287
2314
  }
2288
2315
  // Populate lagged values
2289
- for (var M = 1; M <= _; M++) {
2316
+ for (var M = 1; M <= j; M++) {
2290
2317
  var x = "".concat(P, "_lag_").concat(M), k = e - M, T = k <= 0 || void 0 === A[k] ? null : A[k];
2291
2318
  t.pushToMain({
2292
2319
  index: e,
@@ -2296,9 +2323,9 @@ var OHLCV_INDICATORS;
2296
2323
  }
2297
2324
  }
2298
2325
  } catch (t) {
2299
- j.e(t);
2326
+ _.e(t);
2300
2327
  } finally {
2301
- j.f();
2328
+ _.f();
2302
2329
  }
2303
2330
  }
2304
2331
  } catch (t) {
@@ -2309,59 +2336,59 @@ var OHLCV_INDICATORS;
2309
2336
  return !0;
2310
2337
  };
2311
2338
  // ./src/studies/findCrosses.js
2312
- function nr(t) {
2339
+ function ir(t) {
2313
2340
  return function(t) {
2314
- if (Array.isArray(t)) return ir(t);
2341
+ if (Array.isArray(t)) return ur(t);
2315
2342
  }(t) || function(t) {
2316
2343
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2317
- }(t) || or(t) || function() {
2344
+ }(t) || ar(t) || function() {
2318
2345
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2319
2346
  }();
2320
2347
  }
2321
- function or(t, e) {
2348
+ function ar(t, e) {
2322
2349
  if (t) {
2323
- if ("string" == typeof t) return ir(t, e);
2350
+ if ("string" == typeof t) return ur(t, e);
2324
2351
  var r = {}.toString.call(t).slice(8, -1);
2325
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ir(t, e) : void 0;
2352
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ur(t, e) : void 0;
2326
2353
  }
2327
2354
  }
2328
- function ir(t, e) {
2355
+ function ur(t, e) {
2329
2356
  (null == e || e > t.length) && (e = t.length);
2330
2357
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2331
2358
  return n;
2332
2359
  }
2333
- function ar(t) {
2334
- return ar = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2360
+ function lr(t) {
2361
+ return lr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2335
2362
  return typeof t;
2336
2363
  } : function(t) {
2337
2364
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2338
- }, ar(t);
2365
+ }, lr(t);
2339
2366
  }
2340
- function ur(t, e) {
2367
+ function cr(t, e) {
2341
2368
  for (var r = 0; r < e.length; r++) {
2342
2369
  var n = e[r];
2343
2370
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
2344
- Object.defineProperty(t, lr(n.key), n);
2371
+ Object.defineProperty(t, sr(n.key), n);
2345
2372
  }
2346
2373
  }
2347
- function lr(t) {
2374
+ function sr(t) {
2348
2375
  var e = function(t, e) {
2349
- if ("object" != ar(t) || !t) return t;
2376
+ if ("object" != lr(t) || !t) return t;
2350
2377
  var r = t[Symbol.toPrimitive];
2351
2378
  if (void 0 !== r) {
2352
2379
  var n = r.call(t, e || "default");
2353
- if ("object" != ar(n)) return n;
2380
+ if ("object" != lr(n)) return n;
2354
2381
  throw new TypeError("@@toPrimitive must return a primitive value.");
2355
2382
  }
2356
2383
  return ("string" === e ? String : Number)(t);
2357
2384
  }(t, "string");
2358
- return "symbol" == ar(e) ? e : e + "";
2385
+ return "symbol" == lr(e) ? e : e + "";
2359
2386
  }
2360
- var cr = function(t, e) {
2387
+ var fr = function(t, e) {
2361
2388
  return t > e;
2362
- }, sr = function(t, e) {
2389
+ }, hr = function(t, e) {
2363
2390
  return t < e;
2364
- }, fr = function() {
2391
+ }, yr = function() {
2365
2392
  return t = function t() {
2366
2393
  !function(t, e) {
2367
2394
  if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
@@ -2386,11 +2413,11 @@ var OHLCV_INDICATORS;
2386
2413
  this.areHighAndLowUndefined || void 0 !== r && void 0 !== o || (this.areHighAndLowUndefined = !0),
2387
2414
  null === e || null === n || function(t, e) {
2388
2415
  return t === e;
2389
- }(e, n) ? i = .5 : cr(e, n) ? i = this.areHighAndLowUndefined ? 1 : [ o, n, this.prevLow, this.prevSlow ].every((function(t) {
2416
+ }(e, n) ? i = .5 : fr(e, n) ? i = this.areHighAndLowUndefined ? 1 : [ o, n, this.prevLow, this.prevSlow ].every((function(t) {
2390
2417
  return null !== t;
2391
- })) && sr(o, n) && cr(this.prevLow, this.prevSlow) ? 0 : 1 : sr(e, n) && (i = this.areHighAndLowUndefined ? 0 : [ r, n, this.prevHigh, this.prevSlow ].every((function(t) {
2418
+ })) && hr(o, n) && fr(this.prevLow, this.prevSlow) ? 0 : 1 : hr(e, n) && (i = this.areHighAndLowUndefined ? 0 : [ r, n, this.prevHigh, this.prevSlow ].every((function(t) {
2392
2419
  return null !== t;
2393
- })) && cr(r, n) && sr(this.prevHigh, this.prevSlow) ? 1 : 0), .5 === i ? this.interval = 0 : 1 === i ? this.prevState <= .5 ? this.interval = 1 : this.interval++ : 0 === i && (this.prevState >= .5 ? this.interval = -1 : this.interval--),
2420
+ })) && fr(r, n) && hr(this.prevHigh, this.prevSlow) ? 1 : 0), .5 === i ? this.interval = 0 : 1 === i ? this.prevState <= .5 ? this.interval = 1 : this.interval++ : 0 === i && (this.prevState >= .5 ? this.interval = -1 : this.interval--),
2394
2421
  1 === this.interval && this.crossIndexes.up.push(this.index), -1 === this.interval && this.crossIndexes.down.push(this.index),
2395
2422
  //save prev state
2396
2423
  Object.assign(this, {
@@ -2407,17 +2434,17 @@ var OHLCV_INDICATORS;
2407
2434
  value: function() {
2408
2435
  return this.interval;
2409
2436
  }
2410
- } ]) && ur(t.prototype, e), r && ur(t, r), Object.defineProperty(t, "prototype", {
2437
+ } ]) && cr(t.prototype, e), r && cr(t, r), Object.defineProperty(t, "prototype", {
2411
2438
  writable: !1
2412
2439
  }), t;
2413
2440
  var t, e, r;
2414
- }(), hr = function(t, e) {
2441
+ }(), pr = function(t, e) {
2415
2442
  var r = t.nullArray, n = t.verticalOhlcv, o = t.instances, i = t.len;
2416
2443
  if (0 === e) {
2417
2444
  var a = t.inputParams.filter((function(t) {
2418
2445
  return "crossPairs" === t.key;
2419
2446
  }));
2420
- if ("object" !== ar(a)) return;
2447
+ if ("object" !== lr(a)) return;
2421
2448
  o.crossPairs = {
2422
2449
  crossPairsList: a.flatMap((function(t) {
2423
2450
  return t.params.flat();
@@ -2427,7 +2454,7 @@ var OHLCV_INDICATORS;
2427
2454
  var u, l = function(t, e) {
2428
2455
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2429
2456
  if (!r) {
2430
- if (Array.isArray(t) || (r = or(t)) || e && t && "number" == typeof t.length) {
2457
+ if (Array.isArray(t) || (r = ar(t)) || e && t && "number" == typeof t.length) {
2431
2458
  r && (t = r);
2432
2459
  var n = 0, o = function() {};
2433
2460
  return {
@@ -2477,7 +2504,7 @@ var OHLCV_INDICATORS;
2477
2504
  if (0 === e) {
2478
2505
  if ("number" == typeof f && (n[f] = new Array(i).fill(f)), "price" !== s && !n.hasOwnProperty(s)) throw Error('fast "'.concat(s, ' not found in crossPairs"'));
2479
2506
  if (!n.hasOwnProperty(f)) throw Error('slow "'.concat(f, ' not found in crossPairs"'));
2480
- o[h] = new fr, n[h] = nr(r);
2507
+ o[h] = new yr, n[h] = ir(r);
2481
2508
  }
2482
2509
  var y = void 0, p = void 0, v = void 0, b = void 0, d = void 0;
2483
2510
  "price" === s ? (p = n.close[e], v = n.high[e], b = n.low[e], d = n[f][e], o[h].update({
@@ -2502,27 +2529,27 @@ var OHLCV_INDICATORS;
2502
2529
  }
2503
2530
  };
2504
2531
  // ./src/studies/dateTime.js
2505
- function yr(t) {
2532
+ function vr(t) {
2506
2533
  return function(t) {
2507
- if (Array.isArray(t)) return pr(t);
2534
+ if (Array.isArray(t)) return br(t);
2508
2535
  }(t) || function(t) {
2509
2536
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2510
2537
  }(t) || function(t, e) {
2511
2538
  if (t) {
2512
- if ("string" == typeof t) return pr(t, e);
2539
+ if ("string" == typeof t) return br(t, e);
2513
2540
  var r = {}.toString.call(t).slice(8, -1);
2514
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? pr(t, e) : void 0;
2541
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? br(t, e) : void 0;
2515
2542
  }
2516
2543
  }(t) || function() {
2517
2544
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2518
2545
  }();
2519
2546
  }
2520
- function pr(t, e) {
2547
+ function br(t, e) {
2521
2548
  (null == e || e > t.length) && (e = t.length);
2522
2549
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2523
2550
  return n;
2524
2551
  }
2525
- var vr = function(t) {
2552
+ var dr = function(t) {
2526
2553
  var e = new Date(t), r = e.getMonth(), n = e.getFullYear(), o = e.getHours(), i = e.getMinutes(), a = e.getDay(), u = e.getDate(), l = new Date(e.getFullYear(), e.getMonth(), 1).getDay();
2527
2554
  return {
2528
2555
  month: r,
@@ -2535,31 +2562,31 @@ var OHLCV_INDICATORS;
2535
2562
  };
2536
2563
  };
2537
2564
  // ./src/studies/priceVariations.js
2538
- function br(t) {
2565
+ function mr(t) {
2539
2566
  return function(t) {
2540
- if (Array.isArray(t)) return dr(t);
2567
+ if (Array.isArray(t)) return gr(t);
2541
2568
  }(t) || function(t) {
2542
2569
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2543
2570
  }(t) || function(t, e) {
2544
2571
  if (t) {
2545
- if ("string" == typeof t) return dr(t, e);
2572
+ if ("string" == typeof t) return gr(t, e);
2546
2573
  var r = {}.toString.call(t).slice(8, -1);
2547
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? dr(t, e) : void 0;
2574
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? gr(t, e) : void 0;
2548
2575
  }
2549
2576
  }(t) || function() {
2550
2577
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2551
2578
  }();
2552
2579
  }
2553
- function dr(t, e) {
2580
+ function gr(t, e) {
2554
2581
  (null == e || e > t.length) && (e = t.length);
2555
2582
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2556
2583
  return n;
2557
2584
  }
2558
- var mr = [ "open", "high", "low", "close" ];
2559
- function gr(t, e) {
2585
+ var wr = [ "open", "high", "low", "close" ];
2586
+ function Or(t, e) {
2560
2587
  var r = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
2561
2588
  if (!r) {
2562
- if (Array.isArray(t) || (r = _r(t)) || e && t && "number" == typeof t.length) {
2589
+ if (Array.isArray(t) || (r = Pr(t)) || e && t && "number" == typeof t.length) {
2563
2590
  r && (t = r);
2564
2591
  var n = 0, o = function() {};
2565
2592
  return {
@@ -2601,7 +2628,7 @@ var OHLCV_INDICATORS;
2601
2628
  }
2602
2629
  };
2603
2630
  }
2604
- function wr(t, e) {
2631
+ function Sr(t, e) {
2605
2632
  if (null == t) return {};
2606
2633
  var r, n, o = function(t, e) {
2607
2634
  if (null == t) return {};
@@ -2618,16 +2645,16 @@ var OHLCV_INDICATORS;
2618
2645
  }
2619
2646
  return o;
2620
2647
  }
2621
- function Or(t) {
2648
+ function jr(t) {
2622
2649
  return function(t) {
2623
- if (Array.isArray(t)) return jr(t);
2650
+ if (Array.isArray(t)) return Ar(t);
2624
2651
  }(t) || function(t) {
2625
2652
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
2626
- }(t) || _r(t) || function() {
2653
+ }(t) || Pr(t) || function() {
2627
2654
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2628
2655
  }();
2629
2656
  }
2630
- function Sr(t, e) {
2657
+ function _r(t, e) {
2631
2658
  return function(t) {
2632
2659
  if (Array.isArray(t)) return t;
2633
2660
  }
@@ -2652,23 +2679,23 @@ var OHLCV_INDICATORS;
2652
2679
  }
2653
2680
  return u;
2654
2681
  }
2655
- }(t, e) || _r(t, e) || function() {
2682
+ }(t, e) || Pr(t, e) || function() {
2656
2683
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2657
2684
  }();
2658
2685
  }
2659
- function _r(t, e) {
2686
+ function Pr(t, e) {
2660
2687
  if (t) {
2661
- if ("string" == typeof t) return jr(t, e);
2688
+ if ("string" == typeof t) return Ar(t, e);
2662
2689
  var r = {}.toString.call(t).slice(8, -1);
2663
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? jr(t, e) : void 0;
2690
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ar(t, e) : void 0;
2664
2691
  }
2665
2692
  }
2666
- function jr(t, e) {
2693
+ function Ar(t, e) {
2667
2694
  (null == e || e > t.length) && (e = t.length);
2668
2695
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
2669
2696
  return n;
2670
2697
  }
2671
- var Pr = {
2698
+ var Er = {
2672
2699
  dateTime: function(t, e) {
2673
2700
  var r = t.instances, n = t.verticalOhlcv;
2674
2701
  if (0 === e) {
@@ -2683,17 +2710,17 @@ var OHLCV_INDICATORS;
2683
2710
  cachedDayInfo: i
2684
2711
  }
2685
2712
  }), Object.assign(n, {
2686
- day_of_the_week: yr(o),
2687
- day_of_the_month: yr(o),
2688
- week_of_the_month: yr(o),
2689
- hour: yr(o),
2690
- month: yr(o),
2691
- year: yr(o),
2692
- session_daily_index: yr(o),
2693
- session_intraday_index: yr(o)
2713
+ day_of_the_week: vr(o),
2714
+ day_of_the_month: vr(o),
2715
+ week_of_the_month: vr(o),
2716
+ hour: vr(o),
2717
+ month: vr(o),
2718
+ year: vr(o),
2719
+ session_daily_index: vr(o),
2720
+ session_intraday_index: vr(o)
2694
2721
  });
2695
2722
  }
2696
- var a = n.date[e], u = vr(a), l = u.day_of_the_week, c = u.day_of_the_month, s = u.week_of_the_month, f = u.month, h = u.year, y = u.hour, p = a.slice(0, 10);
2723
+ var a = n.date[e], u = dr(a), l = u.day_of_the_week, c = u.day_of_the_month, s = u.week_of_the_month, f = u.month, h = u.year, y = u.hour, p = a.slice(0, 10);
2697
2724
  p !== r.dateTime.prevDateStr && (r.dateTime.prevDateStr = p, r.dateTime.sessionDailyIndexCount++,
2698
2725
  r.dateTime.sessionIntradayIndexCount = 0), t.pushToMain({
2699
2726
  index: e,
@@ -2730,10 +2757,10 @@ var OHLCV_INDICATORS;
2730
2757
  }), r.dateTime.sessionIntradayIndexCount++;
2731
2758
  },
2732
2759
  priceVariations: function(t, e) {
2733
- 0 === e && (t.priceBased = br(new Set([].concat(br(t.priceBased), [ "mid_price_open_close", "mid_price_high_low" ]))),
2760
+ 0 === e && (t.priceBased = mr(new Set([].concat(mr(t.priceBased), [ "mid_price_open_close", "mid_price_high_low" ]))),
2734
2761
  Object.assign(t.verticalOhlcv, {
2735
- mid_price_open_close: br(t.nullArray),
2736
- mid_price_high_low: br(t.nullArray)
2762
+ mid_price_open_close: mr(t.nullArray),
2763
+ mid_price_high_low: mr(t.nullArray)
2737
2764
  }));
2738
2765
  var r = t.verticalOhlcv.open[e], n = t.verticalOhlcv.high[e], o = t.verticalOhlcv.low[e], i = t.verticalOhlcv.close[e];
2739
2766
  t.pushToMain({
@@ -2797,14 +2824,15 @@ var OHLCV_INDICATORS;
2797
2824
  // Create the main moving average instance.
2798
2825
  // If diff configuration is provided, create the diff indicator.
2799
2826
  if (l[h] = {
2800
- maInstance: new ve[r](n)
2801
- }, u[h] = he(p), null !== a) {
2802
- l[h].diffInstance = new _t(a.size, a.stdDev);
2803
- var v, b = [], d = fe(a.targets);
2827
+ maInstance: new de[r](n),
2828
+ arrayChunk: be({}, y, [])
2829
+ }, u[h] = ye(p), null !== a) {
2830
+ l[h].diffInstance = new jt(a.size, a.stdDev);
2831
+ var v, b = [], d = he(a.targets);
2804
2832
  try {
2805
2833
  for (d.s(); !(v = d.n()).done; ) {
2806
2834
  var m = v.value;
2807
- u["".concat(y, "_").concat(m)] = he(p), a.autoMinMax && t.autoMinMaxKeys.push("".concat(y, "_").concat(m)),
2835
+ u["".concat(y, "_").concat(m)] = ye(p), a.autoMinMax && t.autoMinMaxKeys.push("".concat(y, "_").concat(m)),
2808
2836
  a.lag > 0 && b.push("".concat(y, "_").concat(m));
2809
2837
  }
2810
2838
  } catch (t) {
@@ -2817,7 +2845,7 @@ var OHLCV_INDICATORS;
2817
2845
  c.push(h);
2818
2846
  }
2819
2847
  // Retrieve the current price value.
2820
- var g = u[i][e], w = l[h], O = w.maInstance, S = w.diffInstance;
2848
+ var g = u[i][e], w = l[h], O = w.maInstance, S = w.diffInstance, j = w.arrayChunk;
2821
2849
  // Update the moving average instance.
2822
2850
  O.update(g, s);
2823
2851
  var _ = null;
@@ -2833,44 +2861,44 @@ var OHLCV_INDICATORS;
2833
2861
  key: h,
2834
2862
  value: _
2835
2863
  }), null !== a) {
2836
- var j, P = fe(a.targets);
2864
+ var P, A = he(a.targets);
2837
2865
  try {
2838
- for (P.s(); !(j = P.n()).done; ) {
2839
- var A = j.value, E = null;
2866
+ for (A.s(); !(P = A.n()).done; ) {
2867
+ var E = P.value, M = null, x = null;
2840
2868
  // Compute diffValue only if we have a valid MA value.
2841
- null !== _ && "number" == typeof _ && (E = u[A][e] - _),
2869
+ null !== _ && "number" == typeof _ && (M = u[E][e] - _),
2842
2870
  // Update the diff indicator only if diffValue is a valid number.
2843
- null !== E && "number" == typeof E && S.update(Math.abs(E), s);
2844
- var M = null;
2871
+ null !== M && "number" == typeof M && (S.update(Math.abs(M), s), x = se(j, y, a.size, M, s));
2872
+ var k = null;
2845
2873
  try {
2846
- M = S.getResult();
2874
+ k = S.getResult();
2847
2875
  } catch (t) {
2848
- M = null;
2876
+ k = null;
2849
2877
  }
2850
- var x = ce(E, M, a.scale, a.autoMinMax);
2878
+ ce(M, k, a.scale, a.autoMinMax);
2851
2879
  t.pushToMain({
2852
2880
  index: e,
2853
- key: "".concat(y, "_").concat(A),
2881
+ key: "".concat(y, "_").concat(E),
2854
2882
  value: x
2855
2883
  });
2856
2884
  }
2857
2885
  } catch (t) {
2858
- P.e(t);
2886
+ A.e(t);
2859
2887
  } finally {
2860
- P.f();
2888
+ A.f();
2861
2889
  }
2862
2890
  }
2863
2891
  return !0;
2864
2892
  },
2865
2893
  macd: function(t, e, r, n, o, i) {
2866
- var a = i.target, u = t.verticalOhlcv, l = t.instances, c = t.lastIndexReplace, s = "".concat(r, "_").concat(n, "_").concat(o).concat(a === Oe ? "" : "_".concat(a));
2894
+ var a = i.target, u = t.verticalOhlcv, l = t.instances, c = t.lastIndexReplace, s = "".concat(r, "_").concat(n, "_").concat(o).concat(a === je ? "" : "_".concat(a));
2867
2895
  // Initialization on the first index.
2868
2896
  if (0 === e) {
2869
2897
  var f = t.inputParams, h = t.crossPairsList, y = t.nullArray, p = t.priceBased;
2870
2898
  if (!u.hasOwnProperty(a)) throw new Error("Target property ".concat(a, " not found in verticalOhlcv for macd."));
2871
2899
  var v = f.filter((function(t) {
2872
2900
  return "macd" === t.key;
2873
- })).length, b = v > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", d = a === Oe ? "".concat(b, "_diff") : "".concat(b, "_diff_").concat(a), m = a === Oe ? "".concat(b, "_dea") : "".concat(b, "_dea_").concat(a), g = a === Oe ? "".concat(b, "_histogram") : "".concat(b, "_histogram_").concat(a);
2901
+ })).length, b = v > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", d = a === je ? "".concat(b, "_diff") : "".concat(b, "_diff_").concat(a), m = a === je ? "".concat(b, "_dea") : "".concat(b, "_dea_").concat(a), g = a === je ? "".concat(b, "_histogram") : "".concat(b, "_histogram_").concat(a);
2874
2902
  // Choose a display prefix based on the number of indicators.
2875
2903
  h.push({
2876
2904
  fast: d,
@@ -2879,10 +2907,10 @@ var OHLCV_INDICATORS;
2879
2907
  }), l.hasOwnProperty("macd") || (l.macd = {
2880
2908
  numberOfIndicators: v,
2881
2909
  settings: {}
2882
- }), l.macd.settings[s] = new zt(new Dt(r), new Dt(n), new Dt(o)), Object.assign(u, me(me(me({}, d, ge(y)), m, ge(y)), g, ge(y))),
2910
+ }), l.macd.settings[s] = new zt(new Dt(r), new Dt(n), new Dt(o)), Object.assign(u, we(we(we({}, d, Oe(y)), m, Oe(y)), g, Oe(y))),
2883
2911
  p.push(d, m, g);
2884
2912
  }
2885
- var w = l.macd, O = w.numberOfIndicators, S = w.settings, _ = O > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", j = a === Oe ? "".concat(_, "_diff") : "".concat(_, "_diff_").concat(a), P = a === Oe ? "".concat(_, "_dea") : "".concat(_, "_dea_").concat(a), A = a === Oe ? "".concat(_, "_histogram") : "".concat(_, "_histogram_").concat(a), E = S[s], M = u[a][e];
2913
+ var w = l.macd, O = w.numberOfIndicators, S = w.settings, j = O > 1 ? "macd_".concat(r, "_").concat(n, "_").concat(o) : "macd", _ = a === je ? "".concat(j, "_diff") : "".concat(j, "_diff_").concat(a), P = a === je ? "".concat(j, "_dea") : "".concat(j, "_dea_").concat(a), A = a === je ? "".concat(j, "_histogram") : "".concat(j, "_histogram_").concat(a), E = S[s], M = u[a][e];
2886
2914
  E.update(M, c);
2887
2915
  var x = null;
2888
2916
  try {
@@ -2894,7 +2922,7 @@ var OHLCV_INDICATORS;
2894
2922
  // Always push values; use null as fallback when macdResult is missing.
2895
2923
  return t.pushToMain({
2896
2924
  index: e,
2897
- key: j,
2925
+ key: _,
2898
2926
  value: x ? x.macd : null
2899
2927
  }), t.pushToMain({
2900
2928
  index: e,
@@ -2913,7 +2941,7 @@ var OHLCV_INDICATORS;
2913
2941
  i[o] = {
2914
2942
  instance: new nt(r),
2915
2943
  prevRelativeVolumeSma: null
2916
- }, a[o] = Se(l);
2944
+ }, a[o] = _e(l);
2917
2945
  }
2918
2946
  var c = a.volume[e], s = i[o].instance;
2919
2947
  s.update(c, u);
@@ -2944,7 +2972,7 @@ var OHLCV_INDICATORS;
2944
2972
  settings: {}
2945
2973
  });
2946
2974
  // Set up additional arrays for each range property.
2947
- var w, O = Me(a);
2975
+ var w, O = ke(a);
2948
2976
  try {
2949
2977
  for (O.s(); !(w = O.n()).done; ) {
2950
2978
  var S = w.value;
@@ -2956,54 +2984,54 @@ var OHLCV_INDICATORS;
2956
2984
  } finally {
2957
2985
  O.f();
2958
2986
  }
2959
- var _ = Object.fromEntries(g.map((function(t) {
2960
- return [ t, Ee(b) ];
2987
+ var j = Object.fromEntries(g.map((function(t) {
2988
+ return [ t, xe(b) ];
2961
2989
  })));
2962
2990
  Object.assign(f, function(t) {
2963
2991
  for (var e = 1; e < arguments.length; e++) {
2964
2992
  var r = null != arguments[e] ? arguments[e] : {};
2965
- e % 2 ? Pe(Object(r), !0).forEach((function(e) {
2966
- Ae(t, e, r[e]);
2967
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Pe(Object(r)).forEach((function(e) {
2993
+ e % 2 ? Ee(Object(r), !0).forEach((function(e) {
2994
+ Me(t, e, r[e]);
2995
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ee(Object(r)).forEach((function(e) {
2968
2996
  Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
2969
2997
  }));
2970
2998
  }
2971
2999
  return t;
2972
- }({}, _)), l > 0 && t.lag(g, l), v.push("".concat(m, "_upper"), "".concat(m, "_basis"), "".concat(m, "_lower")),
3000
+ }({}, j)), l > 0 && t.lag(g, l), v.push("".concat(m, "_upper"), "".concat(m, "_basis"), "".concat(m, "_lower")),
2973
3001
  h.donchian_channel.settings[s] = {
2974
3002
  maxDeque: [],
2975
3003
  // will hold indices for highs in descending order
2976
3004
  minDeque: []
2977
3005
  };
2978
3006
  }
2979
- var j = h.donchian_channel.numberOfIndicators > 1 ? "donchian_channel_".concat(s) : "donchian_channel", P = h.donchian_channel.settings[s], A = P.maxDeque, E = P.minDeque, M = e - n, x = M + 1, k = x - r;
3007
+ var _ = h.donchian_channel.numberOfIndicators > 1 ? "donchian_channel_".concat(s) : "donchian_channel", P = h.donchian_channel.settings[s], A = P.maxDeque, E = P.minDeque, M = e - n, x = M + 1, k = x - r;
2980
3008
  // window: [startIdx, endIdx)
2981
3009
  // If the window is not fully available, push null values for all computed outputs.
2982
3010
  if (k < 0 || x > y) {
2983
3011
  t.pushToMain({
2984
3012
  index: e,
2985
- key: "".concat(j, "_upper"),
3013
+ key: "".concat(_, "_upper"),
2986
3014
  value: null
2987
3015
  }), t.pushToMain({
2988
3016
  index: e,
2989
- key: "".concat(j, "_basis"),
3017
+ key: "".concat(_, "_basis"),
2990
3018
  value: null
2991
3019
  }), t.pushToMain({
2992
3020
  index: e,
2993
- key: "".concat(j, "_lower"),
3021
+ key: "".concat(_, "_lower"),
2994
3022
  value: null
2995
3023
  }), i && t.pushToMain({
2996
3024
  index: e,
2997
- key: "".concat(j, "_height"),
3025
+ key: "".concat(_, "_height"),
2998
3026
  value: null
2999
3027
  });
3000
- var T, I = Me(a);
3028
+ var T, I = ke(a);
3001
3029
  try {
3002
3030
  for (I.s(); !(T = I.n()).done; ) {
3003
- var R = T.value;
3031
+ var C = T.value;
3004
3032
  t.pushToMain({
3005
3033
  index: e,
3006
- key: "".concat(j, "_range_").concat(R),
3034
+ key: "".concat(_, "_range_").concat(C),
3007
3035
  value: null
3008
3036
  });
3009
3037
  }
@@ -3015,47 +3043,47 @@ var OHLCV_INDICATORS;
3015
3043
  return !0;
3016
3044
  }
3017
3045
  // **Update the maximum deque:**
3018
- for (var C = f.high, D = f.low; A.length && A[0] < k; ) A.shift();
3019
- for (;A.length && C[A[A.length - 1]] <= C[M]; ) A.pop();
3046
+ for (var R = f.high, D = f.low; A.length && A[0] < k; ) A.shift();
3047
+ for (;A.length && R[A[A.length - 1]] <= R[M]; ) A.pop();
3020
3048
  // **Update the minimum deque:**
3021
3049
  for (A.push(M); E.length && E[0] < k; ) E.shift();
3022
3050
  for (;E.length && D[E[E.length - 1]] >= D[M]; ) E.pop();
3023
3051
  E.push(M);
3024
3052
  // Retrieve computed values with safety checks.
3025
- var V = A.length ? C[A[0]] : null, B = E.length ? D[E[0]] : null, N = "number" == typeof V && "number" == typeof B ? (V + B) / 2 : null;
3053
+ var V = A.length ? R[A[0]] : null, B = E.length ? D[E[0]] : null, N = "number" == typeof V && "number" == typeof B ? (V + B) / 2 : null;
3026
3054
  // Process height if enabled.
3027
3055
  if (
3028
3056
  // Always push the main indicator values.
3029
3057
  t.pushToMain({
3030
3058
  index: e,
3031
- key: "".concat(j, "_upper"),
3059
+ key: "".concat(_, "_upper"),
3032
3060
  value: V
3033
3061
  }), t.pushToMain({
3034
3062
  index: e,
3035
- key: "".concat(j, "_basis"),
3063
+ key: "".concat(_, "_basis"),
3036
3064
  value: N
3037
3065
  }), t.pushToMain({
3038
3066
  index: e,
3039
- key: "".concat(j, "_lower"),
3067
+ key: "".concat(_, "_lower"),
3040
3068
  value: B
3041
3069
  }), i) {
3042
3070
  var L = null;
3043
3071
  "number" == typeof V && "number" == typeof B && 0 !== B && (L = ne((V - B) / B, .001)),
3044
3072
  t.pushToMain({
3045
3073
  index: e,
3046
- key: "".concat(j, "_height"),
3074
+ key: "".concat(_, "_height"),
3047
3075
  value: L
3048
3076
  });
3049
3077
  }
3050
3078
  // Process each range property.
3051
- var H, U = Me(a);
3079
+ var H, U = ke(a);
3052
3080
  try {
3053
3081
  for (U.s(); !(H = U.n()).done; ) {
3054
3082
  var z = H.value, q = null, $ = f[z][e];
3055
3083
  "number" == typeof $ && "number" == typeof V && "number" == typeof B && V - B != 0 && (q = c ? Math.max(Math.min(($ - B) / (V - B), 1), 0) : ($ - B) / (V - B),
3056
3084
  u && (q = ne(q, u))), t.pushToMain({
3057
3085
  index: e,
3058
- key: "".concat(j, "_range_").concat(z),
3086
+ key: "".concat(_, "_range_").concat(z),
3059
3087
  value: q
3060
3088
  });
3061
3089
  }
@@ -3067,30 +3095,30 @@ var OHLCV_INDICATORS;
3067
3095
  return !0;
3068
3096
  },
3069
3097
  bollingerBands: function(t, e, r, n, o) {
3070
- var i, a, u, l, c, s, f, h = o.height, y = o.range, p = void 0 === y ? [] : y, v = o.target, b = o.scale, d = o.lag, m = o.autoMinMax, g = t.verticalOhlcv, w = t.instances, O = t.lastIndexReplace, S = "close" === v ? "" : "_".concat(v), _ = "".concat(r, "_").concat(n).concat(S);
3098
+ var i, a, u, l, c, s, f, h = o.height, y = o.range, p = void 0 === y ? [] : y, v = o.target, b = o.scale, d = o.lag, m = o.autoMinMax, g = t.verticalOhlcv, w = t.instances, O = t.lastIndexReplace, S = "close" === v ? "" : "_".concat(v), j = "".concat(r, "_").concat(n).concat(S);
3071
3099
  // Initialization on the first call.
3072
3100
  if (0 === e) {
3073
- var j = t.priceBased, P = t.inputParams, A = t.nullArray, E = t.verticalOhlcv;
3101
+ var _ = t.priceBased, P = t.inputParams, A = t.nullArray, E = t.verticalOhlcv;
3074
3102
  if (!(v in E)) throw new Error('bollingerBands could not find target "'.concat(v, '"'));
3075
3103
  var M = P.filter((function(t) {
3076
3104
  return "bollingerBands" === t.key;
3077
3105
  })).length;
3078
- f = M > 1 ? "bollinger_bands_".concat(_) : "bollinger_bands".concat(S),
3106
+ f = M > 1 ? "bollinger_bands_".concat(j) : "bollinger_bands".concat(S),
3079
3107
  // Only create the container if it doesn't already exist.
3080
3108
  w.bollinger_bands || (w.bollinger_bands = {
3081
3109
  numberOfIndicators: M,
3082
3110
  settings: {}
3083
3111
  }),
3084
3112
  // Add (or override) the indicator instance keyed by indicatorKey.
3085
- w.bollinger_bands.settings[_] = new _t(r, n);
3113
+ w.bollinger_bands.settings[j] = new jt(r, n);
3086
3114
  var x = [ "".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower") ];
3087
3115
  h && x.push("".concat(f, "_height"));
3088
3116
  // Set up additional arrays for each range property.
3089
- var k, T = De(p);
3117
+ var k, T = Be(p);
3090
3118
  try {
3091
3119
  for (T.s(); !(k = T.n()).done; ) {
3092
3120
  var I = k.value;
3093
- if (!(I in E) || !j.includes(I)) throw new Error('Invalid range item value "'.concat(I, '" property for bollingerBands. Only price based key names are accepted:\n').concat(JSON.stringify(j)));
3121
+ if (!(I in E) || !_.includes(I)) throw new Error('Invalid range item value "'.concat(I, '" property for bollingerBands. Only price based key names are accepted:\n').concat(JSON.stringify(_)));
3094
3122
  x.push("".concat(f, "_range_").concat(I)), m && t.autoMinMaxKeys.push("".concat(f, "_range_").concat(I));
3095
3123
  }
3096
3124
  } catch (t) {
@@ -3098,24 +3126,24 @@ var OHLCV_INDICATORS;
3098
3126
  } finally {
3099
3127
  T.f();
3100
3128
  }
3101
- var R = Object.fromEntries(x.map((function(t) {
3102
- return [ t, Ce(A) ];
3129
+ var C = Object.fromEntries(x.map((function(t) {
3130
+ return [ t, Ve(A) ];
3103
3131
  })));
3104
3132
  Object.assign(E, function(t) {
3105
3133
  for (var e = 1; e < arguments.length; e++) {
3106
3134
  var r = null != arguments[e] ? arguments[e] : {};
3107
- e % 2 ? Ie(Object(r), !0).forEach((function(e) {
3108
- Re(t, e, r[e]);
3109
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ie(Object(r)).forEach((function(e) {
3135
+ e % 2 ? Re(Object(r), !0).forEach((function(e) {
3136
+ De(t, e, r[e]);
3137
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Re(Object(r)).forEach((function(e) {
3110
3138
  Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
3111
3139
  }));
3112
3140
  }
3113
3141
  return t;
3114
- }({}, R)), d > 0 && t.lag(x, d), j.push("".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower"));
3142
+ }({}, C)), d > 0 && t.lag(x, d), _.push("".concat(f, "_upper"), "".concat(f, "_middle"), "".concat(f, "_lower"));
3115
3143
  }
3116
3144
  // Derive prefix for subsequent calls if not set.
3117
- f || (f = w.bollinger_bands.numberOfIndicators > 1 ? "bollinger_bands_".concat(_) : "bollinger_bands".concat(S));
3118
- var C = f, D = w.bollinger_bands.settings[_], V = g[v][e];
3145
+ f || (f = w.bollinger_bands.numberOfIndicators > 1 ? "bollinger_bands_".concat(j) : "bollinger_bands".concat(S));
3146
+ var R = f, D = w.bollinger_bands.settings[j], V = g[v][e];
3119
3147
  // Update the indicator with the current value.
3120
3148
  D.update(V, O);
3121
3149
  // Attempt to retrieve the result.
@@ -3132,34 +3160,34 @@ var OHLCV_INDICATORS;
3132
3160
  // Always push the indicator outputs.
3133
3161
  t.pushToMain({
3134
3162
  index: e,
3135
- key: "".concat(C, "_upper"),
3163
+ key: "".concat(R, "_upper"),
3136
3164
  value: N
3137
3165
  }), t.pushToMain({
3138
3166
  index: e,
3139
- key: "".concat(C, "_middle"),
3167
+ key: "".concat(R, "_middle"),
3140
3168
  value: L
3141
3169
  }), t.pushToMain({
3142
3170
  index: e,
3143
- key: "".concat(C, "_lower"),
3171
+ key: "".concat(R, "_lower"),
3144
3172
  value: H
3145
3173
  }), h) {
3146
3174
  var U = null;
3147
3175
  "number" == typeof N && "number" == typeof H && 0 !== H && (U = ne((N - H) / H, .001)),
3148
3176
  t.pushToMain({
3149
3177
  index: e,
3150
- key: "".concat(C, "_height"),
3178
+ key: "".concat(R, "_height"),
3151
3179
  value: U
3152
3180
  });
3153
3181
  }
3154
3182
  // Process each range property.
3155
- var z, q = De(p);
3183
+ var z, q = Be(p);
3156
3184
  try {
3157
3185
  for (q.s(); !(z = q.n()).done; ) {
3158
3186
  var $ = z.value, F = null, K = g[$][e];
3159
3187
  "number" == typeof K && "number" == typeof H && "number" == typeof N && N - H != 0 && (F = m ? Math.max(Math.min((K - H) / (N - H), 1), 0) : (K - H) / (N - H),
3160
3188
  b && (F = ne(F, b))), t.pushToMain({
3161
3189
  index: e,
3162
- key: "".concat(C, "_range_").concat($),
3190
+ key: "".concat(R, "_range_").concat($),
3163
3191
  value: F
3164
3192
  });
3165
3193
  }
@@ -3179,7 +3207,7 @@ var OHLCV_INDICATORS;
3179
3207
  fastEMA: new Dt(r),
3180
3208
  slowEMA: new Dt(n)
3181
3209
  }
3182
- }), a[s] = Ne(h), f.push({
3210
+ }), a[s] = He(h), f.push({
3183
3211
  fast: s,
3184
3212
  slow: 0,
3185
3213
  isDefault: !0
@@ -3207,76 +3235,74 @@ var OHLCV_INDICATORS;
3207
3235
  }), !0;
3208
3236
  },
3209
3237
  candleVectors: function(t, e, r, n) {
3210
- var o = n.stdDev, i = n.patternSize, a = n.lag, u = n.scale, l = n.autoMinMax, c = t.verticalOhlcv, s = t.instances, f = t.lastIndexReplace, h = function(t, e) {
3211
- return ce(t, e, u, l);
3212
- };
3238
+ var o = n.patternSize, i = n.lag, a = n.autoMinMax, u = t.verticalOhlcv, l = t.instances, c = t.lastIndexReplace;
3213
3239
  if (0 === e) {
3214
- for (var y = t.nullArray, p = [ [ "close", "open" ], [ "close", "high" ], [ "close", "low" ], [ "open", "high" ], [ "open", "low" ], [ "high", "low" ] ], v = [ [ "open", "open" ], [ "high", "high" ], [ "low", "low" ], [ "close", "close" ] ].concat(p), b = [], d = {}, m = 0; m < i; m++) {
3215
- var g, w = Ke(v);
3240
+ for (var s = t.nullArray, f = [ [ "close", "open" ], [ "close", "high" ], [ "close", "low" ], [ "open", "high" ], [ "open", "low" ], [ "high", "low" ] ], h = [ [ "open", "open" ], [ "high", "high" ], [ "low", "low" ], [ "close", "close" ] ].concat(f), y = [], p = {}, v = 0; v < o; v++) {
3241
+ var b, d = Je(h);
3216
3242
  try {
3217
- for (w.s(); !(g = w.n()).done; ) {
3218
- var O = Fe(g.value, 2), S = O[0], _ = O[1];
3219
- b.push("candle_change_".concat(m + 1, "_").concat(S, "_").concat(_)), d["candle_change_".concat(m + 1, "_").concat(S, "_").concat(_)] = $e(y),
3220
- l && t.autoMinMaxKeys.push("candle_change_".concat(m + 1, "_").concat(S, "_").concat(_));
3243
+ for (d.s(); !(b = d.n()).done; ) {
3244
+ var m = Ge(b.value, 2), g = m[0], w = m[1];
3245
+ y.push("candle_change_".concat(v + 1, "_").concat(g, "_").concat(w)), p["candle_change_".concat(v + 1, "_").concat(g, "_").concat(w)] = Ke(s),
3246
+ a && t.autoMinMaxKeys.push("candle_change_".concat(v + 1, "_").concat(g, "_").concat(w));
3221
3247
  }
3222
3248
  } catch (t) {
3223
- w.e(t);
3249
+ d.e(t);
3224
3250
  } finally {
3225
- w.f();
3251
+ d.f();
3226
3252
  }
3227
3253
  }
3228
- for (var j = [], P = {}, A = 0, E = p; A < E.length; A++) {
3229
- var M = Fe(E[A], 2), x = M[0], k = M[1];
3230
- j.push("candle_body_".concat(x, "_").concat(k)), P["candle_body_".concat(x, "_").concat(k)] = $e(y),
3231
- l && t.autoMinMaxKeys.push("candle_body_".concat(x, "_").concat(k));
3254
+ for (var O = [], S = {}, j = 0, _ = f; j < _.length; j++) {
3255
+ var P = Ge(_[j], 2), A = P[0], E = P[1];
3256
+ O.push("candle_body_".concat(A, "_").concat(E)), S["candle_body_".concat(A, "_").concat(E)] = Ke(s),
3257
+ a && t.autoMinMaxKeys.push("candle_body_".concat(A, "_").concat(E));
3232
3258
  }
3233
- var T = [].concat(j, b);
3234
- Object.assign(c, ze(ze({}, P), d)), Object.assign(s, {
3259
+ var M = [].concat(O, y);
3260
+ Object.assign(u, $e($e({}, S), p)), Object.assign(l, {
3235
3261
  candleVectors: {
3236
- bodyVectors: p,
3237
- lookBackVectors: v,
3238
- keyNames: T,
3239
- bodyInstance: new _t(r, o)
3262
+ bodyVectors: f,
3263
+ lookBackVectors: h,
3264
+ keyNames: M,
3265
+ arrayChunk: $e({}, Object.fromEntries(M.map((function(t) {
3266
+ return [ t, [] ];
3267
+ }))))
3240
3268
  }
3241
- }), a > 0 && t.lag(T, a);
3242
- }
3243
- if (0 === e) return !0;
3244
- var I = s.candleVectors, R = I.bodyVectors, C = I.lookBackVectors, D = I.bodyInstance, V = null, B = c.open[e], N = c.close[e], L = We(N, B);
3245
- // Update instances with current absolute values
3246
- D.update(Math.abs(L), f);
3247
- try {
3248
- V = D.getResult();
3249
- } catch (t) {
3250
- // If there's not enough data, means remain null
3269
+ }), i > 0 && t.lag(M, i);
3251
3270
  }
3252
- for (var H = 0; H < R.length; H++) {
3253
- var U = Fe(R[H], 2), z = U[0], q = U[1], $ = c[z][e], F = c[q][e];
3271
+ for (var x = l.candleVectors, k = x.bodyVectors, T = x.lookBackVectors, I = x.arrayChunk, C = 0; C < k.length; C++) {
3272
+ var R = Ge(k[C], 2), D = R[0], V = R[1], B = u[D][e], N = u[V][e], L = "candle_body_".concat(D, "_").concat(V), H = Qe(B, N), U = se(I, L, r, H, c);
3254
3273
  t.pushToMain({
3255
3274
  index: e,
3256
- key: "candle_body_".concat(z, "_").concat(q),
3257
- value: h(We($, F), V)
3275
+ key: L,
3276
+ value: U
3258
3277
  });
3259
3278
  }
3260
- for (var K = 0; K < i; K++) {
3261
- var G, J = Ke(C);
3279
+ for (var z = 0; z < o; z++) {
3280
+ var q, $ = Je(T);
3262
3281
  try {
3263
- for (J.s(); !(G = J.n()).done; ) {
3264
- var W = Fe(G.value, 2), Y = W[0], Q = W[1], X = c[Y][e], Z = c[Q][e - (K + 1)];
3265
- t.pushToMain({
3282
+ for ($.s(); !(q = $.n()).done; ) {
3283
+ var F = Ge(q.value, 2), K = F[0], G = F[1], J = u[K][e], W = u[G][e - (z + 1)], Y = "candle_change_".concat(z + 1, "_").concat(K, "_").concat(G);
3284
+ if (void 0 !== W) {
3285
+ var Q = Qe(J, W), X = se(I, Y, r, Q, c);
3286
+ t.pushToMain({
3287
+ index: e,
3288
+ key: Y,
3289
+ value: X
3290
+ });
3291
+ } else t.pushToMain({
3266
3292
  index: e,
3267
- key: "candle_change_".concat(K + 1, "_").concat(Y, "_").concat(Q),
3268
- value: void 0 === Z ? null : h(We(X, Z), V)
3293
+ key: Y,
3294
+ value: null
3269
3295
  });
3270
3296
  }
3271
3297
  } catch (t) {
3272
- J.e(t);
3298
+ $.e(t);
3273
3299
  } finally {
3274
- J.f();
3300
+ $.f();
3275
3301
  }
3276
3302
  }
3277
3303
  return !0;
3278
3304
  }
3279
- }, Ar = function(t, e, r) {
3305
+ }, Mr = function(t, e, r) {
3280
3306
  var n = function(t) {
3281
3307
  return r > 1 ? t * r : t;
3282
3308
  };
@@ -3287,9 +3313,9 @@ var OHLCV_INDICATORS;
3287
3313
  }
3288
3314
  return 0;
3289
3315
  // Optionally: throw an error if type is not recognized
3290
- }, Er = function(t, e) {
3316
+ }, xr = function(t, e) {
3291
3317
  return "number" === e ? t : "string" === e ? Number(oe(t)) : 0;
3292
- }, Mr = function(t, e) {
3318
+ }, kr = function(t, e) {
3293
3319
  var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0, o = e.len, i = e.inputParams, a = e.hasVolume;
3294
3320
  //do not move nullArray from here
3295
3321
  e.nullArray = new Array(o).fill(null);
@@ -3320,14 +3346,14 @@ var OHLCV_INDICATORS;
3320
3346
  i.f();
3321
3347
  }
3322
3348
  }(e), u.forEach((function(t) {
3323
- e.verticalOhlcv[t] = Or(e.nullArray);
3349
+ e.verticalOhlcv[t] = jr(e.nullArray);
3324
3350
  }));
3325
3351
  // Identify any additional keys from the first input row and initialize them
3326
3352
  var c = Object.keys(t[0]).filter((function(t) {
3327
3353
  return !l.has(t);
3328
3354
  }));
3329
3355
  c.forEach((function(t) {
3330
- e.verticalOhlcv[t] = Or(e.nullArray);
3356
+ e.verticalOhlcv[t] = jr(e.nullArray);
3331
3357
  })), e.otherKeys = c,
3332
3358
  // Set the input types once using the first row
3333
3359
  function(t, e) {
@@ -3341,7 +3367,7 @@ var OHLCV_INDICATORS;
3341
3367
  e.inputTypes[o] = "string", i = oe(i);
3342
3368
  }
3343
3369
  if (0 === e.precisionMultiplier && !0 === e.precision) {
3344
- var a = Sr(String(i).split("."), 2)[1], u = void 0 === a ? "" : a, l = Math.max(4, u.length);
3370
+ var a = _r(String(i).split("."), 2)[1], u = void 0 === a ? "" : a, l = Math.max(4, u.length);
3345
3371
  e.precisionMultiplier = l > 1 ? Math.pow(10, l - 1) : 1;
3346
3372
  }
3347
3373
  }
@@ -3354,12 +3380,12 @@ var OHLCV_INDICATORS;
3354
3380
  var e = t.key, r = t.params;
3355
3381
  return {
3356
3382
  key: e,
3357
- fn: Pr[e],
3383
+ fn: Er[e],
3358
3384
  args: r
3359
3385
  };
3360
3386
  })) : [];
3361
3387
  }(i), f = n; f < o; f++) {
3362
- var h = t[f], y = h.open, p = h.high, v = h.low, b = h.close, d = wr(h, mr), m = e.precisionMultiplier, g = Ar(y, e.inputTypes.open, m), w = Ar(p, e.inputTypes.high, m), O = Ar(v, e.inputTypes.low, m), S = Ar(b, e.inputTypes.close, m);
3388
+ var h = t[f], y = h.open, p = h.high, v = h.low, b = h.close, d = Sr(h, wr), m = e.precisionMultiplier, g = Mr(y, e.inputTypes.open, m), w = Mr(p, e.inputTypes.high, m), O = Mr(v, e.inputTypes.low, m), S = Mr(b, e.inputTypes.close, m);
3363
3389
  // Destructure the base keys and use the rest for other properties
3364
3390
  //sets volume to 0
3365
3391
  if (e.pushToMain({
@@ -3379,15 +3405,15 @@ var OHLCV_INDICATORS;
3379
3405
  key: "close",
3380
3406
  value: S
3381
3407
  }), a) {
3382
- var _ = h.volume, j = Er(_, e.inputTypes.volume);
3408
+ var j = h.volume, _ = xr(j, e.inputTypes.volume);
3383
3409
  e.pushToMain({
3384
3410
  index: f,
3385
3411
  key: "volume",
3386
- value: j
3412
+ value: _
3387
3413
  });
3388
3414
  } else delete d.volume;
3389
3415
  // Populate any extra keys identified during initialization
3390
- var P, A = gr(e.otherKeys);
3416
+ var P, A = Or(e.otherKeys);
3391
3417
  try {
3392
3418
  for (A.s(); !(P = A.n()).done; ) {
3393
3419
  var E = P.value;
@@ -3403,11 +3429,11 @@ var OHLCV_INDICATORS;
3403
3429
  } finally {
3404
3430
  A.f();
3405
3431
  }
3406
- var M, x = gr(s);
3432
+ var M, x = Or(s);
3407
3433
  try {
3408
3434
  for (x.s(); !(M = x.n()).done; ) {
3409
- var k = M.value, T = k.key, I = k.fn, R = k.args;
3410
- [ "crossPairs", "lag" ].includes(T) || I.apply(void 0, [ e, f ].concat(Or(R)));
3435
+ var k = M.value, T = k.key, I = k.fn, C = k.args;
3436
+ [ "crossPairs", "lag" ].includes(T) || I.apply(void 0, [ e, f ].concat(jr(C)));
3411
3437
  }
3412
3438
  // Process these indicators separately (ensuring their execution order)
3413
3439
  } catch (t) {
@@ -3415,9 +3441,9 @@ var OHLCV_INDICATORS;
3415
3441
  } finally {
3416
3442
  x.f();
3417
3443
  }
3418
- rr(e, f), hr(e, f), e.lastComputedIndex++;
3444
+ or(e, f), pr(e, f), e.lastComputedIndex++;
3419
3445
  }
3420
- }, xr = function(t, e) {
3446
+ }, Tr = function(t, e) {
3421
3447
  for (var r = t.length, n = new nt(e), o = new Array(r), i = 0, a = 0, u = 0, l = 0; l < r; l++) if (n.update(t[l]),
3422
3448
  n.isStable) {
3423
3449
  var c = n.getResult();
@@ -3427,10 +3453,10 @@ var OHLCV_INDICATORS;
3427
3453
  return o.map((function(t) {
3428
3454
  return null !== t ? (t - s) / h : null;
3429
3455
  }));
3430
- }, kr = function(t, e) {
3456
+ }, Ir = function(t, e) {
3431
3457
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 5;
3432
3458
  if (t.length !== e.length) throw new Error("Both arrays must have the same length");
3433
- for (var n = xr(t, r), o = xr(e, r), i = t.length, a = [], u = 0, l = 0, c = 0, s = 0, f = 0, h = 0, y = -1, p = 0; p < i; p++) {
3459
+ for (var n = Tr(t, r), o = Tr(e, r), i = t.length, a = [], u = 0, l = 0, c = 0, s = 0, f = 0, h = 0, y = -1, p = 0; p < i; p++) {
3434
3460
  if (null !== n[p] && null !== o[p]) {
3435
3461
  y = p;
3436
3462
  break;
@@ -3454,23 +3480,23 @@ var OHLCV_INDICATORS;
3454
3480
  };
3455
3481
  // Processes the inputParams into a list of indicator calls
3456
3482
  // ./index.js
3457
- function Tr(t) {
3483
+ function Cr(t) {
3458
3484
  return function(t) {
3459
- if (Array.isArray(t)) return Dr(t);
3485
+ if (Array.isArray(t)) return Br(t);
3460
3486
  }(t) || function(t) {
3461
3487
  if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
3462
- }(t) || Cr(t) || function() {
3488
+ }(t) || Vr(t) || function() {
3463
3489
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3464
3490
  }();
3465
3491
  }
3466
- function Ir(t) {
3467
- return Ir = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
3492
+ function Rr(t) {
3493
+ return Rr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
3468
3494
  return typeof t;
3469
3495
  } : function(t) {
3470
3496
  return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
3471
- }, Ir(t);
3497
+ }, Rr(t);
3472
3498
  }
3473
- function Rr(t, e) {
3499
+ function Dr(t, e) {
3474
3500
  return function(t) {
3475
3501
  if (Array.isArray(t)) return t;
3476
3502
  }(t) || function(t, e) {
@@ -3493,36 +3519,36 @@ var OHLCV_INDICATORS;
3493
3519
  }
3494
3520
  return u;
3495
3521
  }
3496
- }(t, e) || Cr(t, e) || function() {
3522
+ }(t, e) || Vr(t, e) || function() {
3497
3523
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3498
3524
  }();
3499
3525
  }
3500
- function Cr(t, e) {
3526
+ function Vr(t, e) {
3501
3527
  if (t) {
3502
- if ("string" == typeof t) return Dr(t, e);
3528
+ if ("string" == typeof t) return Br(t, e);
3503
3529
  var r = {}.toString.call(t).slice(8, -1);
3504
- return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Dr(t, e) : void 0;
3530
+ return "Object" === r && t.constructor && (r = t.constructor.name), "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Br(t, e) : void 0;
3505
3531
  }
3506
3532
  }
3507
- function Dr(t, e) {
3533
+ function Br(t, e) {
3508
3534
  (null == e || e > t.length) && (e = t.length);
3509
3535
  for (var r = 0, n = Array(e); r < e; r++) n[r] = t[r];
3510
3536
  return n;
3511
3537
  }
3512
- function Vr(t, e) {
3538
+ function Nr(t, e) {
3513
3539
  for (var r = 0; r < e.length; r++) {
3514
3540
  var n = e[r];
3515
3541
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
3516
- Object.defineProperty(t, Br(n.key), n);
3542
+ Object.defineProperty(t, Lr(n.key), n);
3517
3543
  }
3518
3544
  }
3519
- function Br(t) {
3545
+ function Lr(t) {
3520
3546
  var e = function(t, e) {
3521
- if ("object" != Ir(t) || !t) return t;
3547
+ if ("object" != Rr(t) || !t) return t;
3522
3548
  var r = t[Symbol.toPrimitive];
3523
3549
  if (void 0 !== r) {
3524
3550
  var n = r.call(t, e || "default");
3525
- if ("object" != Ir(n)) return n;
3551
+ if ("object" != Rr(n)) return n;
3526
3552
  throw new TypeError("@@toPrimitive must return a primitive value.");
3527
3553
  }
3528
3554
  return ("string" === e ? String : Number)(t);
@@ -3535,9 +3561,9 @@ var OHLCV_INDICATORS;
3535
3561
  * to parallel compute various technical indicators in 1 single loop.
3536
3562
  * OHLCV datasets.
3537
3563
  */ (t, "string");
3538
- return "symbol" == Ir(e) ? e : e + "";
3564
+ return "symbol" == Rr(e) ? e : e + "";
3539
3565
  }
3540
- var Nr = [ .001, .002, .0025, .005, .01, .02, .025, .05, .1, .2, .25, .5, 1, 2, 2.5, 5, 10 ], Lr = function() {
3566
+ var Hr = [ .001, .002, .0025, .005, .01, .02, .025, .05, .1, .2, .25, .5, 1, 2, 2.5, 5, 10 ], Ur = function() {
3541
3567
  return t = function t(e) {
3542
3568
  var r = this, n = e.input, o = e.ticker, i = void 0 === o ? null : o, a = e.precision, u = void 0 === a || a, l = e.inputParams, c = void 0 === l ? null : l;
3543
3569
  if (function(t, e) {
@@ -3560,7 +3586,7 @@ var OHLCV_INDICATORS;
3560
3586
  }, this.priceBased = [ "open", "high", "low", "close" ], this.len = n.length, this.lastIndexReplace = !1,
3561
3587
  this.instances = {}, this.crossPairsList = [], this.verticalOhlcv = {}, this.studies = {},
3562
3588
  this.utilities = {
3563
- correlation: kr
3589
+ correlation: Ir
3564
3590
  }, this.invalidValueIndex = -1, this.precision = u, this.precisionMultiplier = !0 === this.precision ? 0 : 1,
3565
3591
  this.autoMinMaxKeys = [], this.minMaxRanges = {}, Array.isArray(c) && (this.inputParams = c,
3566
3592
  this.compute()), this.inputParams = [], this.pushToMain = function(t) {
@@ -3582,8 +3608,8 @@ var OHLCV_INDICATORS;
3582
3608
  min: -1,
3583
3609
  max: 1
3584
3610
  }); else if (n.startsWith("candle_") && y) u[n] = {
3585
- min: -1,
3586
- max: 1
3611
+ min: -3,
3612
+ max: 3
3587
3613
  }; else if (n.includes("_range_") && y) u[n] = {
3588
3614
  min: 0,
3589
3615
  max: 1
@@ -3612,7 +3638,7 @@ var OHLCV_INDICATORS;
3612
3638
  var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
3613
3639
  this.compute();
3614
3640
  for (var e = this.precisionMultiplier, r = this.precision, n = this.invalidValueIndex, o = this.len, i = this.verticalOhlcv, a = this.priceBased, u = {}, l = n >= 0 && t, c = o - (n + 1), s = 0, f = Object.entries(i); s < f.length; s++) {
3615
- var h = Rr(f[s], 2), y = h[0], p = h[1], v = l ? p.slice(-c) : p;
3641
+ var h = Dr(f[s], 2), y = h[0], p = h[1], v = l ? p.slice(-c) : p;
3616
3642
  // If slicing is needed, create a sliced copy, otherwise re-use the array.
3617
3643
  // If this key is price based and precision is enabled, map over the array.
3618
3644
  r && a.includes(y) && (v = v.map((function(t) {
@@ -3674,7 +3700,7 @@ var OHLCV_INDICATORS;
3674
3700
  //compute method can be used to process indicators if no arguments are provided
3675
3701
  //compute method can be called to access the .verticalOhlcv object
3676
3702
  //compute method is called automatically if getLastValues or getDate methods are called
3677
- this.len > this.lastComputedIndex && !t && Mr(this.input, this, 0), t && "object" === Ir(t)) {
3703
+ this.len > this.lastComputedIndex && !t && kr(this.input, this, 0), t && "object" === Rr(t)) {
3678
3704
  var e;
3679
3705
  if (![ "open", "high", "low", "close", "volume", "date" ].every((function(e) {
3680
3706
  return Object.keys(t).includes(e);
@@ -3685,16 +3711,16 @@ var OHLCV_INDICATORS;
3685
3711
  //fallback if .compute(change) is triggered before .compute() alone
3686
3712
  0 === this.lastComputedIndex && this.compute(), i !== r ? (
3687
3713
  // Add new item
3688
- this.len++, this.input.push(t), Mr(this.input, this, this.len)) : (
3714
+ this.len++, this.input.push(t), kr(this.input, this, this.len)) : (
3689
3715
  // Modify the last item
3690
- this.input[n] = t, Mr(this.input, this, n));
3716
+ this.input[n] = t, kr(this.input, this, n));
3691
3717
  }
3692
3718
  return this;
3693
3719
  }
3694
3720
  }, {
3695
3721
  key: "crossPairs",
3696
3722
  value: function(t) {
3697
- return i(this), this.crossPairsList = [].concat(Tr(this.crossPairsList), Tr(t)),
3723
+ return i(this), this.crossPairsList = [].concat(Cr(this.crossPairsList), Cr(t)),
3698
3724
  this.inputParams.push({
3699
3725
  key: "crossPairs",
3700
3726
  params: [ this.crossPairsList ]
@@ -3725,7 +3751,7 @@ var OHLCV_INDICATORS;
3725
3751
  if (!1 === this.hasVolume) throw new Error('If "relativeVolume" is called the input ohlcv must contain valid volume properties.');
3726
3752
  i(this);
3727
3753
  var r = e.scale, n = void 0 === r ? null : r;
3728
- if ("number" == typeof n && !Nr.includes(n)) throw new Error('"scale" value in relativeVolume must be any of the following numbers: '.concat(Nr.join(", ")));
3754
+ if ("number" == typeof n && !Hr.includes(n)) throw new Error('"scale" value in relativeVolume must be any of the following numbers: '.concat(Hr.join(", ")));
3729
3755
  return this.inputParams.push({
3730
3756
  key: "relativeVolume",
3731
3757
  params: [ t, {
@@ -3738,7 +3764,7 @@ var OHLCV_INDICATORS;
3738
3764
  value: function(t) {
3739
3765
  var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
3740
3766
  i(this);
3741
- var r = be("ema", t, e, Nr);
3767
+ var r = me("ema", t, e, Hr);
3742
3768
  return this.inputParams.push({
3743
3769
  key: "movingAverages",
3744
3770
  params: [ "ema", t, r ]
@@ -3749,7 +3775,7 @@ var OHLCV_INDICATORS;
3749
3775
  value: function(t) {
3750
3776
  var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
3751
3777
  i(this);
3752
- var r = be("sma", t, e, Nr);
3778
+ var r = me("sma", t, e, Hr);
3753
3779
  return this.inputParams.push({
3754
3780
  key: "movingAverages",
3755
3781
  params: [ "sma", t, r ]
@@ -3762,7 +3788,7 @@ var OHLCV_INDICATORS;
3762
3788
  if (i(this), "number" != typeof t || t <= 0) throw new Error('"fast" must be a positive number in macd.');
3763
3789
  if ("number" != typeof e || e <= t) throw new Error('"slow" must be a positive number greater than "fast" in macd.');
3764
3790
  if ("number" != typeof r || r <= 0) throw new Error('"signal" must be a positive number in macd.');
3765
- if ("object" !== Ir(n)) throw new Error('"options" must be an object in macd. eg: {target}');
3791
+ if ("object" !== Rr(n)) throw new Error('"options" must be an object in macd. eg: {target}');
3766
3792
  var o = n.target, a = void 0 === o ? "close" : o;
3767
3793
  return this.inputParams.push({
3768
3794
  key: "macd",
@@ -3775,7 +3801,7 @@ var OHLCV_INDICATORS;
3775
3801
  key: "bollingerBands",
3776
3802
  value: function() {
3777
3803
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 20, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
3778
- if (i(this), !r || "object" !== Ir(r)) throw new Error('"options" must be an object in bollingerBands. eg: {target, height, range}');
3804
+ if (i(this), !r || "object" !== Rr(r)) throw new Error('"options" must be an object in bollingerBands. eg: {target, height, range}');
3779
3805
  var n = r.target, o = void 0 === n ? "close" : n, a = r.height, u = void 0 !== a && a, l = r.range, c = void 0 === l ? [] : l, s = r.scale, f = void 0 === s ? null : s, h = r.lag, y = void 0 === h ? 0 : h, p = r.autoMinMax, v = void 0 !== p && p;
3780
3806
  // Validate size and times
3781
3807
  if ("number" != typeof t || t <= 0) throw new Error('"size" must be a positive number in bollingerBands.');
@@ -3784,7 +3810,7 @@ var OHLCV_INDICATORS;
3784
3810
  if ("number" != typeof y) throw new Error('"lag" value must be a number in bollingerBands.');
3785
3811
  if ("boolean" != typeof v) throw new Error('"autoMinMax" value in rsi must be a number in bollingerBands.');
3786
3812
  if ("boolean" != typeof u) throw new Error('"height" must be a boolean in bollingerBands.');
3787
- if ("number" == typeof f && !Nr.includes(f)) throw new Error('"scale" value in bollingerBands must be any of the following numbers: '.concat(Nr.join(", ")));
3813
+ if ("number" == typeof f && !Hr.includes(f)) throw new Error('"scale" value in bollingerBands must be any of the following numbers: '.concat(Hr.join(", ")));
3788
3814
  return this.inputParams.push({
3789
3815
  key: "bollingerBands",
3790
3816
  params: [ t, e, {
@@ -3804,7 +3830,7 @@ var OHLCV_INDICATORS;
3804
3830
  // Validate size and times
3805
3831
  if (i(this), "number" != typeof t || t <= 0) throw new Error('"size" must be a positive number in rsi.');
3806
3832
  var r = e.scale, n = void 0 === r ? null : r, o = e.target, a = void 0 === o ? "close" : o, u = e.lag, l = void 0 === u ? 0 : u, c = e.autoMinMax, s = void 0 !== c && c;
3807
- if ("number" == typeof n && !Nr.includes(n)) throw new Error('"scale" value in rsi must be any of the following numbers: '.concat(Nr.join(", ")));
3833
+ if ("number" == typeof n && !Hr.includes(n)) throw new Error('"scale" value in rsi must be any of the following numbers: '.concat(Hr.join(", ")));
3808
3834
  if ("number" != typeof l) throw new Error('"lag" value in rsi must be a number in rsi.');
3809
3835
  if ("boolean" != typeof s) throw new Error('"autoMinMax" value in rsi must be a number in rsi.');
3810
3836
  return this.inputParams.push({
@@ -3828,7 +3854,7 @@ var OHLCV_INDICATORS;
3828
3854
  if ("number" != typeof f) throw new Error('"lag" value in rsi must be a number in donchianChannels.');
3829
3855
  if ("boolean" != typeof y) throw new Error('"autoMinMax" value in rsi must be a number in donchianChannels.');
3830
3856
  if ("boolean" != typeof o) throw new Error('"height" must be a boolean in donchianChannels.');
3831
- if ("number" == typeof c && !Nr.includes(c)) throw new Error('"scale" value in donchianChannels must be any of the following numbers: '.concat(Nr.join(", ")));
3857
+ if ("number" == typeof c && !Hr.includes(c)) throw new Error('"scale" value in donchianChannels must be any of the following numbers: '.concat(Hr.join(", ")));
3832
3858
  return this.inputParams.push({
3833
3859
  key: "donchianChannels",
3834
3860
  params: [ t, e, {
@@ -3845,10 +3871,10 @@ var OHLCV_INDICATORS;
3845
3871
  value: function() {
3846
3872
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 200, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
3847
3873
  if (i(this), "number" != typeof t || t <= 0) throw new Error('"size" must be a positive number greater than 0 in candleVectors.');
3848
- var r = e.stdDev, n = void 0 === r ? 1 : r, o = e.lag, a = void 0 === o ? 0 : o, u = e.scale, l = void 0 === u ? .05 : u, c = e.patternSize, s = void 0 === c ? 1 : c, f = e.autoMinMax, h = void 0 !== f && f;
3874
+ var r = e.stdDev, n = void 0 === r ? 1 : r, o = e.lag, a = void 0 === o ? 0 : o, u = e.scale, l = void 0 === u ? .001 : u, c = e.patternSize, s = void 0 === c ? 0 : c, f = e.autoMinMax, h = void 0 !== f && f;
3849
3875
  if ("number" != typeof n || n <= 0) throw new Error('"stdDev" must be a positive number greater than 0 in candleVectors.');
3850
- if ("number" == typeof l && !Nr.includes(l)) throw new Error('"scale" value in candleVectors must be any of the following numbers: '.concat(Nr.join(", ")));
3851
- if ("number" != typeof s || !Number.isInteger(s) || s < 1) throw new Error('"patternSize" value in candleVectors must be an integer greater than 0.');
3876
+ if ("number" == typeof l && !Hr.includes(l)) throw new Error('"scale" value in candleVectors must be any of the following numbers: '.concat(Hr.join(", ")));
3877
+ if ("number" != typeof s || !Number.isInteger(s) || s < 0) throw new Error('"patternSize" value in candleVectors must be a positive integer.');
3852
3878
  if ("boolean" != typeof h) throw new Error('"autoMinMax" value in candleVectors must be boolean');
3853
3879
  return this.inputParams.push({
3854
3880
  key: "candleVectors",
@@ -3869,7 +3895,7 @@ var OHLCV_INDICATORS;
3869
3895
  if (i(this), "number" != typeof t || t <= 1) throw new Error('fastSize" must be a positive number greater than 1 in volumeOscillator.');
3870
3896
  if ("number" != typeof e || e <= t) throw new Error('"slowSize" must be a positive number greater than the "fastSize" in volumeOscillator.');
3871
3897
  var n = r.scale, o = void 0 === n ? null : n;
3872
- if ("number" == typeof o && !Nr.includes(o)) throw new Error('"scale" value in volumeOscillator must be any of the following numbers: '.concat(Nr.join(", ")));
3898
+ if ("number" == typeof o && !Hr.includes(o)) throw new Error('"scale" value in volumeOscillator must be any of the following numbers: '.concat(Hr.join(", ")));
3873
3899
  return this.inputParams.push({
3874
3900
  key: "volumeOscillator",
3875
3901
  params: [ t, e, {
@@ -3893,7 +3919,7 @@ var OHLCV_INDICATORS;
3893
3919
  params: []
3894
3920
  }), this;
3895
3921
  }
3896
- } ], e && Vr(t.prototype, e), r && Vr(t, r), Object.defineProperty(t, "prototype", {
3922
+ } ], e && Nr(t.prototype, e), r && Nr(t, r), Object.defineProperty(t, "prototype", {
3897
3923
  writable: !1
3898
3924
  }), t;
3899
3925
  var t, e, r;