A trading candlestick pattern package
Project description
candlestick-patterns (1.1.0)
Candlestick patterns detector
Available patterns
- Inverted Hammer
- Hammer
- Hanging man
- Bearish/Bullish Harami
- Dark cloud cover
- Doji
- Doji Star
- Dragonfly doji
- Gravestone doji
- Bearish engulfing
- Bullish engulfing
- Morning star
- Morning star doji
- Piercing pattern
- Rain drop
- Rain drop doji
- Star
- Shooting star
How to use
Dataframe requirements
- Dataframe must contain open, high, low and close prices
- Open, high, low and close prices must be in numeric type.
Dataframe Example:
time | open | high | low | close |
---|---|---|---|---|
2019-12-24 00:00:00 | 7317.3 | 7436.68 | 7157.04 | 7255.77 |
2019-12-25 00:00:00 | 7255.77 | 7271.77 | 7128.86 | 7204.63 |
2019-12-26 00:00:00 | 7205.01 | 7435 | 7157.12 | 7202 |
2019-12-27 00:00:00 | 7202 | 7275.86 | 7076.42 | 7254.74 |
2019-12-28 00:00:00 | 7254.77 | 7365.01 | 7238.67 | 7316.14 |
2019-12-29 00:00:00 | 7315.36 | 7528.45 | 7288 | 7388.24 |
Code
from candlestick import candlestick
df = candlestick.inverted_hammer(df, target='result')
Result
T | result | open | high | low | close |
---|---|---|---|---|---|
2019-12-24 00:00:00 | False | 7317.3 | 7436.68 | 7157.04 | 7255.77 |
2019-12-25 00:00:00 | False | 7255.77 | 7271.77 | 7128.86 | 7204.63 |
2019-12-26 00:00:00 | True | 7205.01 | 7435 | 7157.12 | 7202 |
2019-12-27 00:00:00 | False | 7202 | 7275.86 | 7076.42 | 7254.74 |
2019-12-28 00:00:00 | False | 7254.77 | 7365.01 | 7238.67 | 7316.14 |
2019-12-29 00:00:00 | False | 7315.36 | 7528.45 | 7288 | 7388.24 |
"True" indicates that pattern is detected at that candle
Parametrs
All pattern detection methods receive 3 parametrs:
- target (String) - Indicates the column to which the result of detection is saved as boolean.
- is_reversed (Bool) - Pass True if rows in dataframe are in time descending order, otherwise False. Deafult is False.
- ohlc (List) - Pass list of strings which indicates the column names of open/high/low/close prices in dataframe. Default: ["open", "high", "low", "close"].
Releasing instructions
https://packaging.python.org/guides/distributing-packages-using-setuptools/#packaging-your-project
To colaborate on the candlestick pattern
Email me at subodh.pushkar@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file candlestick-patterns-subodh101-1.1.0.tar.gz
.
File metadata
- Download URL: candlestick-patterns-subodh101-1.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017cae136ed23759b85d9c5b567336db79524fa4ebbd9c1f273ddad6b492764d |
|
MD5 | 0233fa690b2e6689c3b7dac8f0e04ad0 |
|
BLAKE2b-256 | dbadc584e79c0fa4bea020fd3c3944525c2148bfb347a8cd0296831c16528d37 |
File details
Details for the file candlestick_patterns_subodh101-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: candlestick_patterns_subodh101-1.1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190f7d7ca30c5133a41e684447b16eb665f8bc5d7230b765af530d3a377bc4de |
|
MD5 | b6b709c7118faee3425e80d010b336dc |
|
BLAKE2b-256 | cd5ebda8e5be3f16cd1437cd37e3e3c8b34fa203af58c8a7d86a977e7a5de1c2 |