Skip to main content

Japanese candlestick pattern

Project description

Pylint pytest

japanese-candlestick-pattern

Install

pip install japanese-candlestick

Usage

Assuming having a pandas DataFrame candles with the following columns:

  • 'Open'
  • 'High
  • 'Low'
  • 'Close'

One can compute the japanese candlestick pattern Engulfing as follow:

from patterns import Engulfing

# Instantiate the pattern, with the candles dataframe as arg
engulfing = Engulfing(candles)

# Perform pattern detection
output_df = engulfing.compute_pattern()

The pattern detection value (a bool) is stored in a column having the same name as the pattern (lower case). In above example, the results would be in output_df['engulfing'].

Available patterns

The patterns are computed based on the book 'Japanese Candlestick Charting Techniques', by Steve Nison.

The currently available patterns are the following:

  • Doji
  • DragonflyDoji
  • Engulfing
  • GraveswtoneDoji
  • Hammer
  • HangingMan
  • Harami
  • InvertedHammer
  • LongleggedDoji
  • ShootingStar
  • ThreeWhiteSoldiers
  • ThreeBlackCrows

They are all to be imported from patterns, and all with the same usage (and sometimes parameters), i.e.:

# First import
from patterns import Hammer
# Then instantiate
hammer = Hammer(candles)
# Finally compute detection
output_df = hammer.compute_pattern()

Additional

One can make a telegram bot and configure telegram-send using this tuto.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

japanese-candlestick-0.2.0.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

japanese_candlestick-0.2.0-py3-none-any.whl (24.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page