ohlcv-indicators 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3211,9 +3211,6 @@ var OHLCV_INDICATORS;
|
|
|
3211
3211
|
return ce(t, e, u, l);
|
|
3212
3212
|
};
|
|
3213
3213
|
if (0 === e) {
|
|
3214
|
-
console.log({
|
|
3215
|
-
autoMinMax: l
|
|
3216
|
-
});
|
|
3217
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), d = [], b = {}, m = 0; m < i; m++) {
|
|
3218
3215
|
var g, w = Ke(v);
|
|
3219
3216
|
try {
|
|
@@ -3774,13 +3771,13 @@ var OHLCV_INDICATORS;
|
|
|
3774
3771
|
value: function() {
|
|
3775
3772
|
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] : {};
|
|
3776
3773
|
if (i(this), !r || "object" !== Ir(r)) throw new Error('"options" must be an object in bollingerBands. eg: {target, height, range}');
|
|
3777
|
-
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;
|
|
3774
|
+
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;
|
|
3778
3775
|
// Validate size and times
|
|
3779
3776
|
if ("number" != typeof t || t <= 0) throw new Error('"size" must be a positive number in bollingerBands.');
|
|
3780
3777
|
if ("number" != typeof e || e <= 0) throw new Error('"stdDev" must be a positive number in bollingerBands.');
|
|
3781
3778
|
if (!Array.isArray(c)) throw new Error('If set, "range" must be a array of column names in bollingerBands.');
|
|
3782
|
-
if ("number" != typeof y) throw new Error('"lag" value
|
|
3783
|
-
if ("boolean" != typeof
|
|
3779
|
+
if ("number" != typeof y) throw new Error('"lag" value must be a number in bollingerBands.');
|
|
3780
|
+
if ("boolean" != typeof v) throw new Error('"autoMinMax" value in rsi must be a number in bollingerBands.');
|
|
3784
3781
|
if ("boolean" != typeof u) throw new Error('"height" must be a boolean in bollingerBands.');
|
|
3785
3782
|
if ("number" == typeof f && !Nr.includes(f)) throw new Error('"scale" value in bollingerBands must be any of the following numbers: '.concat(Nr.join(", ")));
|
|
3786
3783
|
return this.inputParams.push({
|
|
@@ -3791,7 +3788,7 @@ var OHLCV_INDICATORS;
|
|
|
3791
3788
|
scale: f,
|
|
3792
3789
|
range: c,
|
|
3793
3790
|
lag: y,
|
|
3794
|
-
autoMinMax:
|
|
3791
|
+
autoMinMax: v
|
|
3795
3792
|
} ]
|
|
3796
3793
|
}), this;
|
|
3797
3794
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ohlcv-indicators",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "A JavaScript library featuring optimized trading indicators for OHLCV arrays [{open, high, low, close, value}]. This library is optimized for backtesting and trading bot development.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|