MCPcopy Index your code
hub / github.com/cinar/indicatorts

github.com/cinar/indicatorts @v2.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.2.2 ↗ · + Follow
242 symbols 686 edges 171 files 33 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

npm version License Build Status codecov CodeQL Analysis

Indicator TS

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.

Indicators Provided

The following list of indicators are currently supported by this package:

Trend Indicators

Momentum Indicators

Volatility Indicators

Volume Indicators

Strategies Provided

Strategies relies on the following:

The following list of strategies are currently supported by this package:

Trend Strategies

Momentum Strategies

Volatility Strategies

Volume Strategies

Backtest

Backtesting is the method for seeing how well a strategy would have done. The following backtesting functions are provided for evaluating strategies.

Chart

Chart provides an easy way to plot the outcome of the indicators and the strategies.

Build

The project can be build from its source through the build command.

npm run build

Usage

Install package.

npm install indicatorts

Import indicator.

import { ao } from 'indicatorts';

const highs = [10, 20, 30, 40];
const lows = [1, 2, 3, 4];

// Awesome Oscillator!
const result = ao(highs, lows);

Disclaimer

The information provided on this project is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.

License

Copyright (c) 2022 Onur Cinar. All Rights Reserved.

The source code is provided under MIT License.

Extension points exported contracts — how you extend this code

TreeNode (Interface)
* Tree node.
src/helper/binarySearchTree.ts
DataSet (Interface)
(no doc)
src/chart/chart.ts
Asset (Interface)
(no doc)
src/strategy/asset.ts
CompanyResult (Interface)
(no doc)
src/backtest/companyResult.ts
KCResult (Interface)
(no doc)
src/indicator/volatility/keltnerChannel.ts
CompanyInfo (Interface)
(no doc)
src/company/companyInfo.ts
TreeNodeInfo (Interface)
* Tree result info object.
src/helper/binarySearchTree.ts
StrategyInfo (Interface)
(no doc)
src/backtest/strategyInfo.ts

Core symbols most depended-on inside this repo

roundDigitsAll
called by 145
src/helper/numArray.ts
subtract
called by 54
src/helper/numArray.ts
ema
called by 30
src/indicator/trend/exponentialMovingAverage.ts
multiplyBy
called by 27
src/helper/numArray.ts
divide
called by 26
src/helper/numArray.ts
sma
called by 21
src/indicator/trend/simpleMovingAverage.ts
checkSameLength
called by 16
src/helper/numArray.ts
msum
called by 15
src/indicator/trend/movingSum.ts

Shape

Function 125
Interface 76
Method 29
Class 8
Enum 4

Languages

TypeScript100%

Modules by API surface

src/helper/numArray.ts23 symbols
src/chart/chart.ts16 symbols
src/helper/binarySearchTree.ts11 symbols
src/indicator/momentum/ichimokuCloud.ts8 symbols
src/chart/numRange.ts8 symbols
src/helper/regression.ts6 symbols
src/backtest/strategyStats.ts6 symbols
src/chart/numScaler.ts5 symbols
src/indicator/trend/chandeForecastOscillator.ts4 symbols
src/helper/date.ts4 symbols
src/strategy/asset.ts3 symbols
src/strategy/action.ts3 symbols

For agents

$ claude mcp add indicatorts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact