All Projects → anandanand84 → Technicalindicators

anandanand84 / Technicalindicators

Licence: mit
A javascript technical indicators written in typescript with pattern recognition right in the browser

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Technicalindicators

Simplestockanalysispython
Stock Analysis Tutorial in Python
Stars: ✭ 126 (-90.51%)
Mutual labels:  stock-market, technical-analysis, stock-data
Finance Go
📊 Financial markets data library implemented in go.
Stars: ✭ 392 (-70.48%)
Mutual labels:  cryptocurrency, stock-market, stock-data
Zvt
modular quant framework.
Stars: ✭ 1,801 (+35.62%)
Mutual labels:  cryptocurrency, stock-market, technical-analysis
Techan
Technical Analysis Library for Golang
Stars: ✭ 404 (-69.58%)
Mutual labels:  cryptocurrency, stock-market, technical-analysis
Fooltrader
quant framework for stock
Stars: ✭ 960 (-27.71%)
Mutual labels:  cryptocurrency, stock-market, technical-analysis
Stock.indicators
Stock indicator technical analysis library package for .NET. Send in historical price quotes and get back desired technical indicators. Nothing more. It can be used in any market analysis software using standard OHLCV price quotes for equities, commodities, forex, cryptocurrencies, and others. We had private trading algorithms, machine learning, and charting systems in mind when originally creating this community library. Current indicators include: Accumulation/Distribution Line (ADL), Aroon Oscillator, Arnaud Legoux Moving Average (ALMA), Average Directional Index (ADX), Average True Range (ATR), Awesome Oscillator (AO), Balance of Power (BOP), Beta Coefficient, Bollinger Bands®, Chaikin Money Flow (CMF), Chaikin Oscillator, Chandelier Exit, Choppiness Index (CHOP), Commodity Channel Index (CCI), ConnorsRSI, Correlation Coefficient, Donchian Channels, Double Exponential Moving Average (DEMA), Elder-ray Index, Exponential Moving Average (EMA), Force Index, Fractal Chaos Bands (FCB), Gator Oscillator, Heikin-Ashi, Hull Moving Average (HMA), Ichimoku Cloud, Kaufman's Adaptive Moving Average (KAMA), KDJ Index, Keltner Channels, Momentum Oscillator, Money Flow Index (MFI), MESA Adaptive Moving Averages (MAMA), Moving Average Convergence/Divergence (MACD), Moving Average Envelopes, On-balance Volume (OBV), Parabolic SAR (stop and reverse), Percentage Volume Oscillator (PVO), Pivot Points and Rolling Pivot Points, Price Channels, Price (Comparative) Relative Strength (PRS), Price Momentum Oscillator (PMO), Rate of Change (ROC), Relative Strength Index (RSI), R-Squared (Coefficient of Determination), Simple Moving Average (SMA), Slope and Linear Regression, Smoothed Moving Average (SMMA), Standard Deviation, Stoller Average Range Channel (STARC) Bands, Stochastic Oscillator, Stochastic RSI, SuperTrend, Tillson T3 Moving Average, Triple Exponential Moving Average (TEMA), Triple EMA Oscillator (TRIX), True Strength Index (TSI), Ulcer Index, Ultimate Oscillator, Volume Simple Moving Average, Volume Weighted Average Price (VWAP), Vortex Indicator (VI), Weighted Moving Average (WMA), Williams %R, Williams Alligator, Williams Fractal, and Zig Zag.
Stars: ✭ 157 (-88.18%)
Mutual labels:  cryptocurrency, stock-market, technical-analysis
Intrinio Realtime Node Sdk
Intrinio NodeJS SDK for Real-Time Stock & Crypto Prices
Stars: ✭ 30 (-97.74%)
Mutual labels:  cryptocurrency, stock-market, stock-data
Ystockquote
Fetch stock quote data from Yahoo Finance
Stars: ✭ 502 (-62.2%)
Mutual labels:  stock-market, stock-data
Stock analysis for quant
Different Types of Stock Analysis in Python, R, Matlab, Excel, Power BI
Stars: ✭ 525 (-60.47%)
Mutual labels:  stock-market, technical-analysis
Octobot
Cryptocurrency trading bot: high frequency, daily trading, social trading, ...
Stars: ✭ 706 (-46.84%)
Mutual labels:  cryptocurrency, technical-analysis
Finance4py
股市技術分析小工具
Stars: ✭ 8 (-99.4%)
Mutual labels:  technical-analysis, stock-data
Awesome Quant
A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)
Stars: ✭ 8,205 (+517.85%)
Mutual labels:  technical-analysis, stock-data
Awesome Ai In Finance
🔬 A curated list of awesome machine learning strategies & tools in financial market.
Stars: ✭ 910 (-31.48%)
Mutual labels:  cryptocurrency, stock-market
Deep Convolution Stock Technical Analysis
Uses Deep Convolutional Neural Networks (CNNs) to model the stock market using technical analysis. Predicts the future trend of stock selections.
Stars: ✭ 407 (-69.35%)
Mutual labels:  stock-market, technical-analysis
Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (-69.5%)
Mutual labels:  stock-market, stock-data
Financedatabase
This is a database of 180.000+ symbols containing Equities, ETFs, Funds, Indices, Futures, Options, Currencies, Cryptocurrencies and Money Markets.
Stars: ✭ 554 (-58.28%)
Mutual labels:  stock-market, stock-data
Exchange Core
Ultra-fast matching engine written in Java based on LMAX Disruptor, Eclipse Collections, Real Logic Agrona, OpenHFT, LZ4 Java, and Adaptive Radix Trees.
Stars: ✭ 801 (-39.68%)
Mutual labels:  cryptocurrency, stock-market
Robin stocks
This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
Stars: ✭ 967 (-27.18%)
Mutual labels:  cryptocurrency, stock-market
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (-27.56%)
Mutual labels:  stock-market, technical-analysis
Pyex
Python interface to IEX and IEX cloud APIs
Stars: ✭ 311 (-76.58%)
Mutual labels:  stock-market, stock-data

Travis CI

TechnicalIndicators

A javascript technical indicators written in typescript.

Installation

Node.js versions >= 10

npm install --save technicalindicators
const SMA = require('technicalindicators').SMA;

Node.js versions < 10

For nodejs version below 10 use 1.x versions of this library.

Webpack

Make sure you have the following in your config file.

module.exports = {
  resolve: {
    mainFields: ["module", "main"]
  }
}

Browser

For browsers install using npm,

For ES6 browsers use

npm install --save technicalindicators
<script src="node_modules/technicalindicators/dist/browser.es6.js"></script>

For ES5 support it is necessary to include the babel-polyfill and respective file browser.js otherwise you will get an error. For example see index.html

npm install --save technicalindicators
npm install --save babel-polyfill
<script src="node_modules/babel-polyfill/browser.js"></script>
<script src="node_modules/technicalindicators/dist/browser.js"></script>

Pattern detection

Pattern detection is removed from version 3.0, if you need pattern detection use v2.0

All indicators will be available in window object. So you can just use

sma({period : 5, values : [1,2,3,4,5,6,7,8,9], reversedInput : true});

or

SMA.calculate({period : 5, values : [1,2,3,4,5,6,7,8,9]});

Playground

Playground with code completion

Crypto Trading hub

If you like this project. You'll love my other project crypto trading hub

  1. Its free
  2. Realtime price charts
  3. Unified trading experience across exchanges
  4. Price alerts
  5. Realtime crypto screening using javascript (Find coins making high and low in realtime or anything you can write using this library and javascript in realtime)
  6. Trading from charts,
  7. Modify orders and ability to trade and create studies using javascript.

Home Screener Trade

Available Indicators

  1. Accumulation Distribution Line (ADL).
  2. Average Directional Index (ADX).
  3. Average True Range (ATR).
  4. Awesome Oscillator (AO).
  5. Bollinger Bands (BB).
  6. Commodity Channel Index (CCI).
  7. Force Index (FI).
  8. Know Sure Thing (KST).
  9. Moneyflow Index (MFI).
  10. Moving Average Convergence Divergence (MACD).
  11. On Balance Volume (OBV).
  12. Parabolic Stop and Reverse (PSAR).
  13. Rate of Change (ROC).
  14. Relative Strength Index (RSI).
  15. Simple Moving Average (SMA).
  16. Stochastic Oscillator (KD).
  17. Stochastic RSI (StochRSI).
  18. Triple Exponentially Smoothed Average (TRIX).
  19. Typical Price.
  20. Volume Weighted Average Price (VWAP).
  21. Volume Profile (VP).
  22. Exponential Moving Average (EMA).
  23. Weighted Moving Average (WMA).
  24. Wilder’s Smoothing (Smoothed Moving Average, WEMA).
  25. WilliamsR (W%R).
  26. Ichimoku Cloud.

Other Utils

  1. Average Gain
  2. Average Loss
  3. Cross Up
  4. Cross Down
  5. Cross Over
  6. Highest
  7. Lowest
  8. Standard Deviation
  9. Sum

Chart Types

  1. Renko (renko)
  2. Heikin-Ashi (HA)

CandleStick Pattern

  1. Abandoned Baby.
  2. Bearish Engulfing Pattern.
  3. Bullish Engulfiing Pattern.
  4. Dark Cloud Cover.
  5. Downside Tasuki Gap.
  6. Doji.
  7. DragonFly Doji.
  8. GraveStone Doji.
  9. BullishHarami.
  10. Bearish Harami Cross.
  11. Bullish Harami Cross.
  12. Bullish Marubozu.
  13. Bearish Marubozu.
  14. Evening Doji Star.
  15. Evening Star.
  16. Bearish Harami.
  17. Piercing Line.
  18. Bullish Spinning Top.
  19. Bearish Spinning Top.
  20. Morning Doji Star.
  21. Morning Star.
  22. Three Black Crows.
  23. Three White Soldiers.
  24. Bullish Hammer.
  25. Bearish Hammer.
  26. Bullish Inverted Hammer.
  27. Bearish Inverted Hammer.
  28. Hammer Pattern.
  29. Hammer Pattern (Unconfirmed).
  30. Hanging Man.
  31. Hanging Man (Unconfirmed).
  32. Shooting Star.
  33. Shooting Star (Unconfirmed).
  34. Tweezer Top.
  35. Tweezer Bottom.

or

Search for all bullish or bearish using

var twoDayBullishInput = {
  open: [23.25,15.36],
  high: [25.10,30.87],
  close: [21.44,27.89],
  low: [20.82,14.93],
}

var bullish = require('technicalindicators').bullish;

bullish(twoDayBullishInput) //true

API

There are three ways you can use to get the indicator results.

calculate

Every indicator has a static method calculate which can be used to calculate the indicator without creating an object.

const sma = require('technicalindicators').sma;
var prices = [1,2,3,4,5,6,7,8,9,10,12,13,15];
var period = 10;
sma({period : period, values : prices})

or

const SMA = require('technicalindicators').SMA;
var prices = [1,2,3,4,5,6,7,8,9,10,12,13,15];
var period = 10;
SMA.calculate({period : period, values : prices})

nextValue

nextValue method is used to get the next indicator value.

var sma = new SMA({period : period, values : []});
var results = [];
prices.forEach(price => {
  var result = sma.nextValue(price);
  if(result)
    results.push(result)
});

getResult

This a merge of calculate and nextValue. The usual use case would be

  1. Initialize indicator with available price value

  2. Get results for initialized values

  3. Use nextValue to get next indicator values for further tick.

    var sma = new SMA({period : period, values : prices});
    sma.getResult(); // [5.5, 6.6, 7.7, 8.9]
    sma.nextValue(16); // 10.1
    

    Note: Calling nextValue will not update getResult() value.

Precision

This uses regular javascript numbers, so there can be rounding errors which are negligible for a technical indicators, you can set precision by using the below config. By default there is no precision set.

const technicalIndicators = require('technicalindicators');
technicalIndicators.setConfig('precision', 10);

Contribute

Create issues about anything you want to report, change of API's, or request for adding new indicators. You can also create pull request with new indicators.

Environment dependencies

Typescript: Use typescript 2.0.0 other you might get max call stack reached error.

npm install -g [email protected]

TechnicalIndicators depends on the canvas package, which requires some dependencies to be installed. You can find the instructions to do that here. If you do not install these dependencies, expect to get this error message during the installation of TechnicalIndicators:

> [email protected] install /Users/balupton/Projects/trading/technicalindicators/node_modules/canvas
> node-gyp rebuild

./util/has_lib.sh: line 31: pkg-config: command not found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp

Setup

git clone [email protected]:anandanand84/technicalindicators.git  # or use your fork
cd technicalindicators
npm run start

Running tests and getting coverage

npm test
npm run cover

Adding new indicators

  1. Add tests for the indicator and make them pass.
    (It would be better if a sample of the stockcharts excel is used for the test case.)
  2. Add the indicator to the index.js and src/index.ts
  3. Run build scripts: npm run build-lib && npm run generateDts && npm run start
  4. Add it to README.md, with the link to the runkit url containing the sample.
  5. Add indicator it to keywords in package.json and bower.json
  6. Send a Pull Request.

Verify Documentation

node testdocs.js
open "http://localhost:5444/testdocs.html"

Donate

  1. XRB: xrb_1shh8i77upiq4bjzi3ajik9ofq14bbcucshoapi3m7f8d74dc5k31o56yj5r
  2. ETH: 0x0B56580Eb25f3F7e366dDA697161d314C17Bcb6a
  3. LTC: LLTUhKBRKs9sbW9F8MFQm7VVdZ1dJnXzGc
  4. BTC: 1FGeJHoj7tjeLrm4JNtyPWTdBKPJjcqP6Y
  5. BCH: 1AUFc8CEfHVjnoixbqTbX62WV8DZkpC1DU
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].