ohlcv-indicators 3.5.47 → 3.5.48

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -355,14 +355,14 @@ export default class OHLCV_INDICATORS {
355
355
  return this
356
356
  }
357
357
 
358
- vidya(size = 14, smoothing = 20, options = {}) {
358
+ vidya(size = 14, momentum = 20, options = {}) {
359
359
 
360
360
  const methodName = 'vidya'
361
361
 
362
362
  isAlreadyComputed(this)
363
363
 
364
364
  validateNumber(size, {min: 2, max: this.len, allowDecimals: false}, 'size', methodName)
365
- validateNumber(smoothing, {min: size, max: this.len, allowDecimals: false}, 'smoothing', methodName)
365
+ validateNumber(momentum, {min: 1, max: this.len, allowDecimals: false}, 'momentum', methodName)
366
366
  validateObject(options, 'options', methodName)
367
367
 
368
368
  const {target = 'close', lag = 0, atrLength = 200, bandDistance = 2, liquidityLookback = 20} = options
@@ -375,7 +375,7 @@ export default class OHLCV_INDICATORS {
375
375
 
376
376
  const order = getOrderFromArray([target], methodName)
377
377
 
378
- this.inputParams.push({key: methodName, order, params: [size, smoothing, {target, lag}]})
378
+ this.inputParams.push({key: methodName, order, params: [size, momentum, {target, lag}]})
379
379
 
380
380
  return this
381
381
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohlcv-indicators",
3
- "version": "3.5.47",
3
+ "version": "3.5.48",
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",