hhv-llv

1.0.2 • Public • Published

Build Status Coverage

hhv-llv

Calculates the highest high values / lowest low values of closing prices over the preceding periods (periods includes the current time)

Install

$ npm install hhv-llv

Usage

import {
  hhv,
  llv
} from 'hhv-llv'
 
const array = [1, 2, 4, 1]
 
hhv(array, 2)    // [, 2, 4, 4]
hhv(array)       // 4
hhv(array, 5)    // [<4 empty items>]
hhv(array, 1)    // [1, 2, 4, 1]
 
hhv(array, 2)    // [, 1, 2, 2]

hhv(data, periods)

  • data Array.<Number> the array of closing prices.
  • periods Number the size of periods

Returns Number the highest closing prices over the preceding periods periods.

llv(data, periods)

Instead, returns Number the lowest closing prices.

License

MIT

Dependents (1)

Package Sidebar

Install

npm i hhv-llv

Weekly Downloads

6

Version

1.0.2

License

MIT

Last publish

Collaborators

  • kael