Indicator is a TypeScript module providing various stock technical analysis indicators, strategies, and a backtest framework for trading.
This is a clone of my Indicator Go Golang module.
The following list of indicators are currently supported by this package:
- Absolute Price Oscillator (APO)
- Aroon Indicator
- Balance of Power (BOP)
- Chande Forecast Oscillator (CFO)
- Community Channel Index (CCI)
- Double Exponential Moving Average (DEMA)
- Exponential Moving Average (EMA)
- Mass Index (MI)
- Moving Average Convergence Divergence (MACD)
- Moving Max (MMAX)
- Moving Min (MMIN)
- Moving Sum (MSUM)
- Parabolic SAR (PSAR)
- Qstick
- Random Index (KDJ)
- Rolling Moving Average (RMA)
- Simple Moving Average (SMA)
- Since Change
- Triple Exponential Moving Average (TEMA)
- Triangular Moving Average (TRIMA)
- Triple Exponential Average (TRIX)
- Typical Price
- Volume Weighted Moving Average (VWMA)
- Vortex Indicator
- Awesome Oscillator (AO)
- Chaikin Oscillator (CMO)
- Ichimoku Cloud
- Percentage Price Oscillator (PPO)
- Percentage Volume Oscillator (PVO)
- Price Rate of Change (ROC)
- Relative Strength Index (RSI)
- Stochastic Oscillator (STOCH)
- Williams R (WILLR)
- Acceleration Bands (AB)
- Average True Range (ATR)
- Bollinger Bands (BB)
- Bollinger Band Width (BBW)
- Chandelier Exit (CE)
- Donchian Channel (DC)
- Keltner Channel (KC)
- Moving Standard Deviation (MSTD)
- Projection Oscillator (PO)
- True Range (TR)
- Ulcer Index (UI)
- Accumulation/Distribution (AD)
- Chaikin Money Flow (CMF)
- Ease of Movement (EMV)
- Force Index (FI)
- Money Flow Index (MFI)
- Negative Volume Index (NVI)
- On-Balance Volume (OBV)
- Volume Price Trend (VPT)
- Volume Weighted Average Price (VWAP)
Strategies relies on the following:
The following list of strategies are currently supported by this package:
- Absolute Price Oscillator Strategy
- Aroon Strategy
- Balance of Power Strategy
- Chande Forecast Oscillator Strategy
- KDJ Strategy
- MACD Strategy
- Parabolic SAR Strategy
- Typical Price Strategy
- Volume Weighted Moving Average (VWMA) Strategy
- Vortex Strategy
- Awesome Oscillator Strategy
- Ichimoku Cloud Strategy
- RSI 2 Stategy
- Stochastic Oscillator Strategy
- Williams R Strategy
- Chaikin Money Flow Strategy
- Ease of Movement Strategy
- Force Index Strategy
- Money Flow Index Strategy
- Negative Volume Index Strategy
- Volume Weighted Average Price Strategy
Backtesting is the method for seeing how well a strategy would have done. The following backtesting functions are provided for evaluating strategies.
Chart provides an easy way to plot the outcome of the indicators and the strategies.
The project can be build from its source through the build command.
npm run buildInstall package.
npm install indicatortsImport indicator.
import { ao } from 'indicatorts';
const highs = [10, 20, 30, 40];
const lows = [1, 2, 3, 4];
// Awesome Oscillator!
const result = ao(highs, lows);Financial Risk: Trading stocks, futures, and cryptocurrencies involves significant risk of loss and is not suitable for every investor. The use of leveraged instruments can lead to losses greater than the initial investment.
Not Financial Advice: The information and tools provided in this project are strictly for educational and informational purposes and are not to be construed as advice or solicitation to buy or sell any security. They do NOT constitute financial, investment, or trading advice. Onur Cinar is not a financial advisor.
No Warranties: This software is provided "AS IS," without warranty of any kind. Technical analysis indicators are based on historical data and do not guarantee future results. While we strive for 90%+ test coverage, software can contain bugs.
Limitation of Liability: In no event shall the author or contributors be liable for any financial loss, data loss, or any other damages arising from the use of this library. Use at your own risk.
The source code is provided under MIT License.
Copyright © 2022 Onur Cinar
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.