# tulind

> Tulip Indicators Wrapper Providing Over 100 Technical Analysis Functions

Latest version **0.8.20** (published 2021-08-08) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install tulind
pnpm add tulind
yarn add tulind
bun add tulind
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.20 |
| Published | 2021-08-08 |
| First published | 2016-12-20 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 227.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 515 |
| Author | Lewis Van Winkle |
| Maintainers | tulipcharts, codeplea |
| Keywords | tulip, charts, charting, indicators, oscillator, overlay, technical, analysis, finance, trading, markets |

## Links

- npm: https://www.npmjs.com/package/tulind
- Repository: https://github.com/TulipCharts/tulipnode
- Homepage: https://github.com/TulipCharts/tulipnode#readme
- Issues: https://github.com/TulipCharts/tulipnode/issues
- npm.io page: https://npm.io/package/tulind

## Dependencies (4)

- [nan](https://npm.io/package/nan.md) ^2.14.0
- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [minctest](https://npm.io/package/minctest.md) 0.0.x
- [@mapbox/node-pre-gyp](https://npm.io/package/@mapbox/node-pre-gyp.md) ^1.0.5

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.8.20 (latest) — 2021-08-08
- 0.8.18 — 2019-07-22
- 0.8.15 — 2019-03-08
- 0.8.14 — 2019-01-25
- 0.8.13 — 2018-09-19
- 0.8.12 — 2018-08-27
- 0.8.11 — 2018-08-07
- 0.8.10 — 2018-03-20
- 0.8.9 — 2017-12-12
- 0.8.7 — 2017-08-09
- 0.8.6 — 2017-04-21
- 0.8.4 — 2016-12-20

## README

[![Build Status](https://travis-ci.com/TulipCharts/tulipnode.svg?branch=master)](https://travis-ci.com/TulipCharts/tulipnode)
[![Build Status](https://ci.appveyor.com/api/projects/status/ps9l8w7fxi81v2q5/branch/master?svg=true)](https://ci.appveyor.com/project/codeplea/tulipnode)
[![npm](https://img.shields.io/npm/dw/tulind.svg)](https://www.npmjs.com/package/tulind)

# Tulip Node

Tulip Node is the official node.js wrapper for [Tulip
Indicators](https://tulipindicators.org). It provides 100+
technical analysis indicator functions, such as:
simple moving average, Bollinger Bands, MACD, Parabolic SAR, Stochastic
Oscillator, and many more.


## Installation

Installation should just be:

``` js
npm install tulind
```

It should work on Windows, Os X, and Linux. Node version 10, 11, 12, 13, 14 (LTS),
15 and 16 are tested and supported on each platform.

Note that pre-compiled binaries are available for Windows. For other platforms
you will need a C++ build environment installed. On Linux based distributions
this can be achieved by installing `build-essential` package.

You can force building from source with:

```js
npm install tulind --build-from-source
```

If you run into problems, let me know. I want this to be easy for everyone to
use.


## Usage

Tulip Node is very easy to use.

``` js
var tulind = require('tulind');
console.log("Tulip Indicators version is:");
console.log(tulind.version);
```

In these examples, we assume you already have price data loaded such as:
``` js
//Examples assume you have some price data like this:
//Data order is from oldest to newset (index 0 is the oldest)
var open  = [4,5,5,5,4,4,4,6,6,6];
var high  = [9,7,8,7,8,8,7,7,8,7];
var low   = [1,2,3,3,2,1,2,2,2,3];
var close = [4,5,6,6,6,5,5,5,6,4];
var volume = [123,232,212,232,111,232,212,321,232,321];
```

Calculating a simple moving average is as easy as:

``` js
//Do a simple moving average on close prices with period of 3.
tulind.indicators.sma.indicator([close], [3], function(err, results) {
  console.log("Result of sma is:");
  console.log(results[0]);
});
```



Example of calculating the Stochastic Oscillator:

``` js
//Functions that take multiple inputs, options, or outputs use arrays.
//Call Stochastic Oscillator, taking 3 inputs, 3 options, and 2 outputs.
tulind.indicators.stoch.indicator([high, low, close], [5, 3, 3], function(err, results) {
  console.log("Result of stochastic oscillator is:");
  console.log(results[0]);
  console.log(results[1]);
});
```


It's also easy to discover argument types at run-time:

``` js
//Discover argument types at run-time:
console.log(tulind.indicators.stoch);

//Produces:
{ name: 'stoch',
  full_name: 'Stochastic Oscillator',
  type: 'indicator',
  inputs: 3,
  options: 3,
  outputs: 2,
  input_names: [ 'high', 'low', 'close' ],
  option_names: [ '%k period', '%k slowing period', '%d period' ],
  output_names: [ 'stoch_k', 'stoch_d' ],
  indicator: [Function],
  start: [Function] }
```


Many (most) indicators return an output array length smaller than the input length.
You can get the difference like this:

``` js
console.log("Given these options, the output arrays will be this much shorter than the input arrays:");
console.log(tulind.indicators.stoch.start([5,3,3]));
```


Hopefully it's obvious, but you can see all the available indicators by doing:
``` js
console.log(tulind.indicators);
```

You can also see a full list of the available indicators on the [Tulip
Indicators website here](https://tulipindicators.org/list).

---
_Source: https://npm.io/package/tulind · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
