Git Product home page Git Product logo

candlestick_checker's Introduction

Candlestick Checker License

Use the most popular candle stick patterns to reinforce the signals of your trading indicators. This tiny library focuses on simplicity.

It groups the patterns into three main sections:

Single Candle Pattern Double Candle Pattern Triple Candle Pattern
BullishDoji BullishEngolfer BullishMorningStar
BullishHammer BullishPiercing BullishWhiteSoldiers
BearishDoji BullishTweezerBottom BullishKicker
BearishShotingStar BearishEngolfer BearishEveningStar
BearishDarkCloudCover BearishThreeBlackCrows
BearishTweezerTop BearishKicker

But instead of worrying about each one of them or checking it one by one, this tiny lib evaluates all of them returning only a bullish or bearish signal.

Simple Usage

I prefer to check for all in one like in the example bellow, but if you prefer, you may check individually.

// CHECK FOR ALL CANDLE STICK PATTERN

// if you are in a downtrend, check for bullish signals
boolean isSingleBullish = CandleStickFactory.single(candles).isBullish();
boolean isDoubleBullish = CandleStickFactory.doubl(candles).isBullish();
boolean isTripleBullish = CandleStickFactory.triple(candles).isBullish();

if(isSingleBullish || isDoubleBullish || isTripleBullish){
  // if you are in a downtrend and your trending signal are indicating
  // a possible turn over to an uptrend, this could be the right moment to 
  // buy a position. It should act as a reinforcement of your indicators
  
  // ... do something here...
}

// if you are in an uptrend, check for bearish signals
boolean isSingleBearish = CandleStickFactory.single(candles).isBearish();
boolean isDoubleBearish = CandleStickFactory.doubl(candles).isBearish();
boolean isTripleBearish = CandleStickFactory.triple(candles).isBearish();

if(isSingleBearish || isDoubleBearish || isTripleBearish){
  // if you are in an uptrend and your trending signal are indicating
  // a possible turn over to a downtrend, this could be the right moment to 
  // sell a position. It should act as a reinforcement of your indicators
  
  // ... do something here...
}

Setup

  • Create an eclipse maven java project
  • Clone this repo to your local machine using git clone https://github.com/treslines/candlestick_checker.git
  • Include it in your project and reference it

Test coverage

All candlestick sections were tested. Those tests can be found at com.treslines.test.candlestick and for each one exits a single test case. But, for simplicity, there is a test suite that runs all tests together automatically everytime we accept a pull request.

CandleStickTestSuite

  • SingleCandleStickPatternTest
  • DoubleCandleStickPatternTest
  • TripleCandleStickPatternTest

Contributions - Minimal requirements:

  • Classes should follow the same pattern as the model classes with javadoc
  • Fork the project, implement your contribution, make a pull request

License:

License

Author:

Ricardo Ferreira
Instagram: ricardo7307
Twitter: ricardo_7307
Needs Driven Development (NDD): http://codegramm.herokuapp.com/index.html

candlestick_checker's People

Contributors

treslines 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.