Giter Site home page Giter Site logo

stock-indicators's Introduction

Functions

OBV(ticks)Array

计算obv指标

MACD(ticks)Object

计算macd指标,快速和慢速移动平均线的周期分别取12和26

KDJ(ticks)Object

计算kdj指标,rsv的周期为9日

MA(ticks, Number)Array

计算移动平均线指标, ma的周期为days

BOLL(ticks)Object

计算boll指标,ma的周期为20日

RSI(ticks)Object

计算rsi指标,分别返回以6日,12日,24日为参考基期的RSI值

OBV(ticks) ⇒ Array

计算obv指标

Kind: global function
Returns: Array - obvs

Param Type Description
ticks Array ticks为二维数组类型,其中内层数组第一个值为收盘价,第二个值为成交量

MACD(ticks) ⇒ Object

计算macd指标,快速和慢速移动平均线的周期分别取12和26

Kind: global function
Returns: Object - 返回一个包含diffs deas bars属性的对象,每个属性对应的类型为{Array[Number]}

Param Type Description
ticks Array 一维数组类型,每个元素为tick的收盘价格

KDJ(ticks) ⇒ Object

计算kdj指标,rsv的周期为9日

Kind: global function
Returns: Object - 返回一个包含k d j属性的对象,每个属性对应的类型为{Array[Number]}

Param Type Description
ticks Array 二维数组类型,其中内层数组包含三个元素值,第一个值表示当前Tick的最高价格,第二个表示当前Tick的最低价格,第三个表示当前Tick的收盘价格

MA(ticks, Number) ⇒ Array

计算移动平均线指标, ma的周期为days

Kind: global function
Returns: Array - mas

Param Type Description
ticks Array
Number days 一维数组类型,每个元素为当前Tick的收盘价格

BOLL(ticks) ⇒ Object

计算boll指标,ma的周期为20日

Kind: global function
Returns: Object - 返回一个包含upper mid lower属性的对象,每个属性对应的类型为{Array[Number]}

Param Type Description
ticks Array 一维数组类型,每个元素为当前Tick的收盘价格

RSI(ticks) ⇒ Object

计算rsi指标,分别返回以6日,12日,24日为参考基期的RSI值

Kind: global function
Returns: Object - 返回一个包含rsi6 rsi12 rsi24属性的对象,每个属性对应的类型为{Array[Number]}

Param Type Description
ticks Array 一维数组类型,每个元素为当前Tick的收盘价格

stock-indicators's People

Contributors

kimboqi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.