Giter Club home page Giter Club logo

candlesticks's Introduction

Candlesticks

Candlesticks pattern detection for MATLAB.

Table of Contents

  1. Acknowledgements
  2. Description
  3. Syntax
  4. Outputs
  5. Available Candlesticks
  6. Notes
  7. Example
  8. ToDo
  9. Tests
  10. Further Information

Acknowledgements

Based on the work of Nate Jensen. See reference implemention here.

Description

Since the early days of the Japanese rice traders, candlestick charting has grown into a complex technical analysis tool based primarily on patterns. Candlestick charts are flexible, because candlestick charts can be used alone or in combination with other technical analysis techniques, not instead of other technical tools. As with all charting methods, candlestick chart patterns are subject to interpretation by the user. Currently, there are 90 patterns.

-- Nate Jensen

Syntax

[bull, bear, neutral] = candlesticks(open,high,low,close)
Inputs
open - open price
high - high price
low - low price
close - close price

Outputs

  • bear ๐Ÿป - bearish patterns
  • bull ๐Ÿ‚ - bullish patterns
  • neutral ๐Ÿ˜- neutral patterns

Outputs are formatted into cells. The index of each cell corresponds to the index of that pattern in the order listed under Candlesticks. Each cell holds all of the indices from the input for the end of a pattern. For example:

  • bear{1} is the Abandoned Baby ๐Ÿšผ pattern
  • [23; 78; 92] are the contents of that cell and are the indices of the end of that pattern

Available Candlesticks

Bullish ๐Ÿ‚

  • Bullish Reversal High Reliability
    • 01 -Abandoned Baby
    • 02 - Concealing Baby Swallow
    • 03 - Kicking
    • 04 - Morning Doji Star
    • 05 - Morning Star
    • 06 - Piercing Line
    • 07 - Three Inside Up
    • 08 - Three Outside Up
    • 09 - Three White Soldiers
  • Bullish Reversal Moderate Reliability
    • 10 - Breakaway
    • 11 - Counter Attack
    • 12 - Doji Star
    • 13 - Dragonfly Doji
    • 14 - Engulfing
    • 15 - Gravestone Doji
    • 16 - Harami Cross
    • 17 - Homing Pigeon
    • 18 - Ladder Bottom
    • 19 - Long Legged Doji
    • 20 - Matching Low
    • 21 - Meeting Lines
    • 22 - Stick Sandwich
    • 23 - Three Stars in the South
    • 24 - Tri Star
    • 25 - Unique Three River Bottom
  • Bullish Reversal Low Reliability
    • 26 - Belt Hold
    • 27 - Hammer
    • 28 - Harami
    • 29 - Inverted Hammer
  • Bullish Continuation High Reliability
    • 30 - Mat Hold
    • 31 - Rising Three Methods
  • Bullish Continuation Moderate Reliability
    • 32 - Side-by-Side White Lines
    • 33 - Upside Tasuki Gap
    • 34 - Upside Gap Three Methods
  • Bullish Continuation Low Reliability
    • 35 - Separating Lines
    • 36 - Three Line Strike
  • Bullish Reversal/Continuation Low Reliability
    • 37 - Closing Marubozu
    • 38 - Long Line
    • 39 - Marubozu
    • 40 - Opening Marubozu

Bearish ๐Ÿป

  • Bearish Reversal High Reliability
    • 01 - Abandoned Baby
    • 02 - Dark Cloud Cover
    • 03 - Evening Doji Star
    • 04 - Evening Star
    • 05 - Kicking
    • 06 - Three Black Crows
    • 07 - Three Inside Down
    • 08 - Three Outside Down
    • 09 - Upside Gap Two Crows
  • Bearish Reversal Moderate Reliability
    • 10 - Advance Block
    • 11 - Breakaway
    • 12 - Counter Attack
    • 13 - Deliberation
    • 14 - Doji Star
    • 15 - Dragonfly Doji
    • 16 - Engulfing
    • 17 - Gravestone Doji
    • 18 - Harami Cross
    • 19 - Identical Three Crows
    • 20 - Long Legged Doji
    • 21 - Meeting Lines
    • 22 - Tri Star
    • 23 - Two Crows
  • Bearish Reversal Low Reliability
    • 24 - Belt Hold
    • 25 - Hanging Man
    • 26 - Harami
    • 27 - Shooting Star
  • Bearish Continuation High Reliability
    • 28 - Falling Three Methods
  • Bearish Continuation Moderate Reliability
    • 29 - Downside Gap Three Methods
    • 30 - Downside Tasuki Gap
    • 31 - In Neck
    • 32 - On Neck
    • 33 - Side-by-Side White Lines
  • Bearish Continuation Low Reliability
    • 34 - Separating Lines
    • 35 - Three Line Strike
    • 36 - Thrusting
  • Bearish Reversal/Continuation Low Reliability
    • 37 - Closing Marubozu
    • 38 - Long Line
    • 39 - Marubozu
    • 40 - Opening Marubozu

Neutral ๐Ÿ˜

  • Neutral Reversal Moderate Reliability
    • 01 - High Wave
    • 02 - Inverted Takuri/Umbrella
    • 03 - Takuri/Umbrella
  • Neutral Reversal/Continuation Low Reliability
    • 04 - Doji
    • 05 - Four Price Doji
    • 06 - Normal Line
    • 07 - Rickshaw Man
    • 08 - Short Line
    • 09 - Spinning Top
    • 10 - Stalled Pattern

Notes

  • data must be column oriented
  • there are no argument checks
  • most patterns require a prior bullish or bearish trend; this code does not check for that
  • all patterns either require, recommend, or suggest confirmation; this code does not check for that

Example

load disney.mat
[bull, bear, neutral] = candlesticks(dis_OPEN, dis_HIGH, dis_LOW, dis_CLOSE);

% The following command produces same output as the above command because map is the default output format.
options = struct('outputFormat', "map");
[bull, bear, neutral] = candlesticks(dis_OPEN, dis_HIGH, dis_LOW, dis_CLOSE, options);

% To have independent signals with the same length as OHLC table use the following:
options = struct('outputFormat', "signals");
[bullSignals, bearSignals, neutralSignals] = candlesticks(dis_OPEN, dis_HIGH, dis_LOW, dis_CLOSE, options);

To Do

  • add more candlesticks

Tests

Run the following command to test this library.

testResults = runtests('TestCandlesticks')

Further Information

For an in depth analysis of how many of these candlesticks work, refer to one of the following websites or Google it.

candlesticks's People

Stargazers

 avatar Vince Lynch avatar Sinan avatar Daniel @ Krypton avatar

Watchers

James Cloos avatar Daniel @ Krypton 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.