项目作者: darklight9811

项目描述 :
A set of tools to detect patterns in graphs
高级语言: JavaScript
项目地址: git://github.com/darklight9811/candlelit.git
创建时间: 2020-08-23T03:45:42Z
项目社区:https://github.com/darklight9811/candlelit

开源协议:BSD 3-Clause "New" or "Revised" License

下载


GitHub npm npm Build Status Support

WIP: candlelit

Candlelit is a bundle of useful functions and patterns to help you build your own matches for entry points in any market.
Developed by Rafael Correa Chaves and Guilherme Vitorino as a way to easily implement and detect graphical patterns in new projects, candlelit is a easy solution for any programmer. If you wish to contribute any patterns we miss, you can write an email to: rafael.correa@aposoftworks.com or a new issue to our github with the title: [NP] . We hope you like it and enjoy using it.

Installation

NPM

  1. npm install --save candlelit

Yarn

  1. yarn add candlelit

Usage

You can easily require our candle module to use with your graph and use it as a promise

  1. import {analyzeCandle} from 'candlelit';
  2. const graph = [/* graph data*/];
  3. analyzeCandle(graph).then(response => {
  4. console.log(response);
  5. });

You can also add your own patterns to the list

  1. function customPattern(graph) {
  2. // it must return either undefined for not match
  3. // or the info about the pattern following the interface
  4. }
  5. analyzeCandle.add(graph);
  6. // You can also get the entire list
  7. console.log(analyzeCandle.list());
  8. // Or clear it
  9. analyzeCandle.reset();

Here is how you should build your candle graph pattern

  1. const graph = [
  2. [
  3. 1, // open
  4. 1, // high
  5. 1, // low
  6. 1, // close
  7. ]
  8. ];

Patterns available

Remember that testing a large chart with many patterns can be a costy process, so avoid using it every change you make to the chart. Or scope to the patterns you actually care about.

Candlestick

3 Bar Play

Reversed 3 Bar Play