
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Tulip Node is the official node.js wrapper for Tulip Indicators. It provides 100+ technical analysis indicator functions, such as: simple moving average, Bollinger Bands, MACD, Parabolic SAR, Stochastic Oscillator, and many more.
Installation should just be:
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:
npm install tulind --build-from-source
If you run into problems, let me know. I want this to be easy for everyone to use.
Tulip Node is very easy to use.
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:
//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:
//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:
//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:
//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:
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:
console.log(tulind.indicators);
You can also see a full list of the available indicators on the Tulip Indicators website here.
FAQs
Tulip Indicators Wrapper Providing Over 100 Technical Analysis Functions
The npm package tulind receives a total of 1,456 weekly downloads. As such, tulind popularity was classified as popular.
We found that tulind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.