# Bamboo-TA: Technical Analysis Indicators Library
<p align="center">
<a href="https://github.com/DutchCryptoDad/bamboo-ta">
<img src="images/bamboo.png" alt="Bamboo TA" width="250">
</a>
</p>
[![license](https://img.shields.io/github/license/DutchCryptoDad/bamboo-ta)](#license)
[![Python Version](https://img.shields.io/pypi/pyversions/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)
[![PyPi Version](https://img.shields.io/pypi/v/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)
[![Package Status](https://img.shields.io/pypi/status/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)
[![Downloads](https://img.shields.io/pypi/dm/bamboo_ta?style=flat)](https://pypistats.org/packages/bamboo_ta)
[![Stars](https://img.shields.io/github/stars/DutchCryptoDad/bamboo-ta?style=flat)](#stars)
[![Forks](https://img.shields.io/github/forks/DutchCryptoDad/bamboo-ta?style=flat)](#forks)
[![Used By](https://img.shields.io/badge/used_by-0-orange.svg?style=flat)](#usedby)
[![Contributors](https://img.shields.io/github/contributors/DutchCryptoDad/bamboo-ta?style=flat)](#contributors)
[![Issues](https://img.shields.io/github/issues-raw/DutchCryptoDad/bamboo-ta?style=flat)](#issues)
[![Closed Issues](https://img.shields.io/github/issues-closed-raw/DutchCryptoDad/bamboo-ta?style=flat)](#closed-issues)
[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Ddutchalgotrading%26type%3Dpatrons&style=flat)](https://patreon.com/dutchalgotrading)
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC-AOcefy1x7lTc17JiqaxqA)
](https://www.youtube.com/@dutchalgotrading)
[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UC-AOcefy1x7lTc17JiqaxqA)](https://www.youtube.com/@dutchalgotrading)
---
## About Bamboo-TA
**Bamboo-TA** is a personal library that consolidates various Technical Analysis (TA) indicators into one simple and modular package for analyzing financial market data. It is designed to help traders develop trading strategies based on candlestick data.
While this library includes popular TA indicators like **MACD**, **RSI**, **SMA**, **EMA**, it also provides lesser-known indicators like **Waddah Attar Explosion** and **Bollinger Bands Trend Indicator**. Bamboo-TA is complementary to other libraries like **TA-lib**, **Pandas-ta**, and **qtpylib**, and it is not intended to replace them.
If you're looking for a library to use for data analysis, backtesting, or integrating indicators into trading bots, Bamboo-TA is designed for simplicity and ease of use.
---
## Features
- **Modular Indicators**: Includes a wide range of trend, volatility, momentum, performance, volume, and other types of indicators.
- **Complementary to Other Libraries**: Works alongside popular TA libraries such as **TA-lib** and **Pandas-ta**.
- **Focus on Algorithmic Trading**: Useful for developing custom algorithmic trading strategies with backtesting capabilities.
- **Personal Project**: Built and maintained for personal use but shared with the community.
---
## Installation
### Stable Version
Install the latest stable version directly from PyPi:
```bash
pip install bamboo-ta
```
### Development Version
To install the bleeding-edge version from the GitHub repository:
```bash
pip install -U git+https://github.com/DutchCryptoDad/bamboo-ta.git@development
```
---
## Usage
### Importing the Library
To start using Bamboo-TA, import the library in your Python scripts or notebooks:
```python
import bamboo_ta as bta
import pandas as pd
import numpy as np
```
### Preparing Data
Make sure to format your `DataFrame` correctly, like this:
```python
df = pd.read_json("./BTC_USDT-1d.json")
df.columns = ['date', 'open', 'high', 'low', 'close', 'volume']
df['date'] = pd.to_datetime(df['date'], unit='ms')
```
### Applying Indicators
You can apply indicators in various ways. Here's how to use **Alligator Bands**:
```python
alligator_result = bta.alligator_bands(df, 'close', 13, 8, 5, jaw_shift=8, teeth_shift=5, lips_shift=3)
df['jaw'] = alligator_result['jaw']
df['teeth'] = alligator_result['teeth']
df['lips'] = alligator_result['lips']
```
### Importing Individual Indicators
You can also import and apply individual indicators. Here's how to the **Exponential Moving Average**::
```python
from bamboo_ta.trend import exponential_moving_average
df['ema'] = bta.exponential_moving_average(df, "close", 21)
```
---
## Indicator Categories
Explore the wide range of indicators:
- [Candles](./docs/candles.md)
- [Cycles](./docs/cycles.md)
- [Momentum](./docs/momentum.md)
- [Performance](./docs/performance.md)
- [Statistics](./docs/statistics.md)
- [Trend](./docs/trend.md)
- [Utility](./docs/utility.md)
- [Volatility](./docs/volatility.md)
- [Volume](./docs/volume.md)
---
## Social & Community
- **YouTube**: Check out my [YouTube channel](https://www.youtube.com/@dutchalgotrading) for tutorials on [Freqtrade](https://www.youtube.com/watch?v=VHvikJmQrVM), [Tradingview](https://www.youtube.com/watch?v=aQSC-W8oYdw), and tested [trading strategies](https://www.youtube.com/watch?v=Jj9MSzHwa44).
- **Patreon**: For exclusive trading algorithms, backtests, and strategy codes, support me on [Patreon](https://www.patreon.com/dutchalgotrading).
- **Strategy League**: View the results of my tested strategies at [DutchAlgoTrading.com](https://www.dutchalgotrading.com).
---
## Support & Donations
If you find Bamboo-TA useful, consider supporting the project:
- **Patreon**: Support via [Patreon](https://www.patreon.com/dutchalgotrading).
- **Ko-fi**: Make a one-time donation on [Ko-fi](https://ko-fi.com/dutchcryptodad).
### Affiliates
- [Bybit Rewards](https://partner.bybit.com/b/dutchalgo)
- [Linode $100 Credit](https://bit.ly/Linode_Advantages)
- [TradingView Discount](https://www.tradingview.com/?aff_id=139223)
- [Saxo Bank (Dutch Only)](https://refer.saxo/fKnth)
---
## Disclaimer
Bamboo-TA is a personal project, and while I make every effort to ensure accuracy, I cannot guarantee the functionality of the indicators. They are tested against Binance (BTC/USDT) data and compared with similar indicators on [TradingView](https://www.tradingview.com/?aff_id=139223).
I personally use these indicators to build my own trading strategies, for backtesting and manual & bot trading using the [Freqtrade trading bot](https://www.youtube.com/watch?v=VHvikJmQrVM&list=PL8gq8aFDPpbNEx4lUvpmRjxtCkjvX-Jpg). So it is in my own personal best interest to make these indicators work as accurately as possible.
Suggestions and bug reports are welcome, but fixes will be handled on a best-effort basis. Please be patient!
---
## Indicator sources
* [ThinkOrSwim Tech indicators](https://tlc.thinkorswim.com/center/reference/Tech-Indicators)
* [Legendary TA](https://github.com/just-nilux/legendary_ta)
* [CryptoFrog Custom Indicators](https://github.com/froggleston/cryptofrog-strategies/blob/main/custom_indicators.py)
* [Linnsoft](https://www.linnsoft.com/techind/accumulation-distribution)
* [Profitspi](https://www.profitspi.com/stock/view.aspx?v=stock-chart-library)
* [Cybernetic Analysis](https://www.neuroshell.com/manuals/cyber/index.html)
* [TRradeStation](https://help.tradestation.com/10_00/eng/tradestationhelp/elanalysis/indicator/price_channel__percent_pc_indicator_.htm)
* [Sierra Chart](https://www.sierrachart.com/index.php?page=doc/TechnicalStudiesReference.php)
* [qtpylib](https://github.com/ranaroussi/qtpylib/blob/main/qtpylib/indicators.py)
Raw data
{
"_id": null,
"home_page": "https://github.com/DutchCryptoDad/bamboo-ta",
"name": "bamboo-ta",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, pandas, numpy, trading, indicator, technical analysis",
"author": "DutchCryptoDad (DCD)",
"author_email": "<dutchcryptodad@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/2d/2f/ad7aefac07d7a28cb43a69cecf9a65f027988214a904a08e512de186bc6e/bamboo-ta-0.3.1.tar.gz",
"platform": null,
"description": "# Bamboo-TA: Technical Analysis Indicators Library\n\n<p align=\"center\">\n <a href=\"https://github.com/DutchCryptoDad/bamboo-ta\">\n <img src=\"images/bamboo.png\" alt=\"Bamboo TA\" width=\"250\">\n </a>\n</p>\n\n[![license](https://img.shields.io/github/license/DutchCryptoDad/bamboo-ta)](#license)\n[![Python Version](https://img.shields.io/pypi/pyversions/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)\n[![PyPi Version](https://img.shields.io/pypi/v/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)\n[![Package Status](https://img.shields.io/pypi/status/bamboo-ta?style=flat)](https://pypi.org/project/bamboo-ta/)\n[![Downloads](https://img.shields.io/pypi/dm/bamboo_ta?style=flat)](https://pypistats.org/packages/bamboo_ta)\n[![Stars](https://img.shields.io/github/stars/DutchCryptoDad/bamboo-ta?style=flat)](#stars)\n[![Forks](https://img.shields.io/github/forks/DutchCryptoDad/bamboo-ta?style=flat)](#forks)\n[![Used By](https://img.shields.io/badge/used_by-0-orange.svg?style=flat)](#usedby)\n[![Contributors](https://img.shields.io/github/contributors/DutchCryptoDad/bamboo-ta?style=flat)](#contributors)\n[![Issues](https://img.shields.io/github/issues-raw/DutchCryptoDad/bamboo-ta?style=flat)](#issues)\n[![Closed Issues](https://img.shields.io/github/issues-closed-raw/DutchCryptoDad/bamboo-ta?style=flat)](#closed-issues)\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Ddutchalgotrading%26type%3Dpatrons&style=flat)](https://patreon.com/dutchalgotrading)\n[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC-AOcefy1x7lTc17JiqaxqA)\n](https://www.youtube.com/@dutchalgotrading)\n[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UC-AOcefy1x7lTc17JiqaxqA)](https://www.youtube.com/@dutchalgotrading)\n\n---\n\n## About Bamboo-TA\n\n**Bamboo-TA** is a personal library that consolidates various Technical Analysis (TA) indicators into one simple and modular package for analyzing financial market data. It is designed to help traders develop trading strategies based on candlestick data.\n\nWhile this library includes popular TA indicators like **MACD**, **RSI**, **SMA**, **EMA**, it also provides lesser-known indicators like **Waddah Attar Explosion** and **Bollinger Bands Trend Indicator**. Bamboo-TA is complementary to other libraries like **TA-lib**, **Pandas-ta**, and **qtpylib**, and it is not intended to replace them.\n\nIf you're looking for a library to use for data analysis, backtesting, or integrating indicators into trading bots, Bamboo-TA is designed for simplicity and ease of use.\n\n---\n\n## Features\n\n- **Modular Indicators**: Includes a wide range of trend, volatility, momentum, performance, volume, and other types of indicators.\n- **Complementary to Other Libraries**: Works alongside popular TA libraries such as **TA-lib** and **Pandas-ta**.\n- **Focus on Algorithmic Trading**: Useful for developing custom algorithmic trading strategies with backtesting capabilities.\n- **Personal Project**: Built and maintained for personal use but shared with the community.\n\n---\n\n## Installation\n\n### Stable Version\n\nInstall the latest stable version directly from PyPi:\n\n```bash\npip install bamboo-ta\n```\n\n### Development Version\n\nTo install the bleeding-edge version from the GitHub repository:\n\n```bash\npip install -U git+https://github.com/DutchCryptoDad/bamboo-ta.git@development\n```\n\n---\n\n## Usage\n\n### Importing the Library\n\nTo start using Bamboo-TA, import the library in your Python scripts or notebooks:\n\n```python\nimport bamboo_ta as bta\nimport pandas as pd\nimport numpy as np\n```\n\n### Preparing Data\n\nMake sure to format your `DataFrame` correctly, like this:\n\n```python\ndf = pd.read_json(\"./BTC_USDT-1d.json\")\ndf.columns = ['date', 'open', 'high', 'low', 'close', 'volume']\ndf['date'] = pd.to_datetime(df['date'], unit='ms')\n```\n\n### Applying Indicators\n\nYou can apply indicators in various ways. Here's how to use **Alligator Bands**:\n\n```python\nalligator_result = bta.alligator_bands(df, 'close', 13, 8, 5, jaw_shift=8, teeth_shift=5, lips_shift=3)\ndf['jaw'] = alligator_result['jaw']\ndf['teeth'] = alligator_result['teeth']\ndf['lips'] = alligator_result['lips']\n```\n\n### Importing Individual Indicators\n\nYou can also import and apply individual indicators. Here's how to the **Exponential Moving Average**::\n\n```python\nfrom bamboo_ta.trend import exponential_moving_average\n\ndf['ema'] = bta.exponential_moving_average(df, \"close\", 21)\n```\n\n---\n\n## Indicator Categories\n\nExplore the wide range of indicators:\n\n- [Candles](./docs/candles.md)\n- [Cycles](./docs/cycles.md)\n- [Momentum](./docs/momentum.md)\n- [Performance](./docs/performance.md)\n- [Statistics](./docs/statistics.md)\n- [Trend](./docs/trend.md)\n- [Utility](./docs/utility.md)\n- [Volatility](./docs/volatility.md)\n- [Volume](./docs/volume.md)\n\n---\n\n## Social & Community\n\n- **YouTube**: Check out my [YouTube channel](https://www.youtube.com/@dutchalgotrading) for tutorials on [Freqtrade](https://www.youtube.com/watch?v=VHvikJmQrVM), [Tradingview](https://www.youtube.com/watch?v=aQSC-W8oYdw), and tested [trading strategies](https://www.youtube.com/watch?v=Jj9MSzHwa44).\n- **Patreon**: For exclusive trading algorithms, backtests, and strategy codes, support me on [Patreon](https://www.patreon.com/dutchalgotrading).\n- **Strategy League**: View the results of my tested strategies at [DutchAlgoTrading.com](https://www.dutchalgotrading.com).\n\n---\n\n## Support & Donations\n\nIf you find Bamboo-TA useful, consider supporting the project:\n\n- **Patreon**: Support via [Patreon](https://www.patreon.com/dutchalgotrading).\n- **Ko-fi**: Make a one-time donation on [Ko-fi](https://ko-fi.com/dutchcryptodad).\n\n### Affiliates\n\n- [Bybit Rewards](https://partner.bybit.com/b/dutchalgo)\n- [Linode $100 Credit](https://bit.ly/Linode_Advantages)\n- [TradingView Discount](https://www.tradingview.com/?aff_id=139223)\n- [Saxo Bank (Dutch Only)](https://refer.saxo/fKnth)\n\n---\n\n## Disclaimer\n\nBamboo-TA is a personal project, and while I make every effort to ensure accuracy, I cannot guarantee the functionality of the indicators. They are tested against Binance (BTC/USDT) data and compared with similar indicators on [TradingView](https://www.tradingview.com/?aff_id=139223).\n\nI personally use these indicators to build my own trading strategies, for backtesting and manual & bot trading using the [Freqtrade trading bot](https://www.youtube.com/watch?v=VHvikJmQrVM&list=PL8gq8aFDPpbNEx4lUvpmRjxtCkjvX-Jpg). So it is in my own personal best interest to make these indicators work as accurately as possible.\n\nSuggestions and bug reports are welcome, but fixes will be handled on a best-effort basis. Please be patient!\n\n---\n\n## Indicator sources\n\n* [ThinkOrSwim Tech indicators](https://tlc.thinkorswim.com/center/reference/Tech-Indicators)\n* [Legendary TA](https://github.com/just-nilux/legendary_ta)\n* [CryptoFrog Custom Indicators](https://github.com/froggleston/cryptofrog-strategies/blob/main/custom_indicators.py)\n* [Linnsoft](https://www.linnsoft.com/techind/accumulation-distribution)\n* [Profitspi](https://www.profitspi.com/stock/view.aspx?v=stock-chart-library)\n* [Cybernetic Analysis](https://www.neuroshell.com/manuals/cyber/index.html)\n* [TRradeStation](https://help.tradestation.com/10_00/eng/tradestationhelp/elanalysis/indicator/price_channel__percent_pc_indicator_.htm)\n* [Sierra Chart](https://www.sierrachart.com/index.php?page=doc/TechnicalStudiesReference.php)\n* [qtpylib](https://github.com/ranaroussi/qtpylib/blob/main/qtpylib/indicators.py)\n",
"bugtrack_url": null,
"license": null,
"summary": "TA library for Pandas",
"version": "0.3.1",
"project_urls": {
"Homepage": "https://github.com/DutchCryptoDad/bamboo-ta"
},
"split_keywords": [
"python",
" pandas",
" numpy",
" trading",
" indicator",
" technical analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e688e88c04786f1435e7cfffed0bc64b8ee58bad6dc88e693690ac8a0e1896f3",
"md5": "50a7c157445a1eaea31ddbaac3a48c5c",
"sha256": "7f5e4128b4fde6da612a38a57faebcc2b977578530058a207da411ecfa85d0b5"
},
"downloads": -1,
"filename": "bamboo_ta-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50a7c157445a1eaea31ddbaac3a48c5c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 44660,
"upload_time": "2025-01-11T18:48:31",
"upload_time_iso_8601": "2025-01-11T18:48:31.552378Z",
"url": "https://files.pythonhosted.org/packages/e6/88/e88c04786f1435e7cfffed0bc64b8ee58bad6dc88e693690ac8a0e1896f3/bamboo_ta-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d2fad7aefac07d7a28cb43a69cecf9a65f027988214a904a08e512de186bc6e",
"md5": "4e723a3e3a01ac97ec50d752f5ede35a",
"sha256": "c3ff9f8d99eb17f5ea9dedb7264bbfad54272f8e41bf75d131786884b893ff4f"
},
"downloads": -1,
"filename": "bamboo-ta-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "4e723a3e3a01ac97ec50d752f5ede35a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 43527,
"upload_time": "2025-01-11T18:48:34",
"upload_time_iso_8601": "2025-01-11T18:48:34.721426Z",
"url": "https://files.pythonhosted.org/packages/2d/2f/ad7aefac07d7a28cb43a69cecf9a65f027988214a904a08e512de186bc6e/bamboo-ta-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-11 18:48:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DutchCryptoDad",
"github_project": "bamboo-ta",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "ta",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "pandas_ta",
"specs": []
}
],
"lcname": "bamboo-ta"
}