ohlcv-indicators 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -74,20 +74,19 @@ export default class OHLCV_INDICATORS {
|
|
|
74
74
|
|
|
75
75
|
getLastValues(){
|
|
76
76
|
|
|
77
|
-
if(Object.keys(this.indicators).length > 0)
|
|
78
|
-
{
|
|
79
|
-
this.compute()
|
|
80
|
-
}
|
|
81
|
-
|
|
82
77
|
return this.getData()[this.getData().length -1]
|
|
78
|
+
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
compute() {
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
|
|
84
|
+
if(Object.keys(this.indicators).length === 0) return this
|
|
85
|
+
|
|
86
|
+
|
|
88
87
|
const addColumn = this.addColumn.bind(this)
|
|
89
88
|
|
|
90
|
-
for(const [key, arr] of Object.entries(indicators))
|
|
89
|
+
for(const [key, arr] of Object.entries( this.indicators))
|
|
91
90
|
{
|
|
92
91
|
if(!this.verticalOhlcv.hasOwnProperty(key))
|
|
93
92
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ohlcv-indicators",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
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",
|