Interactive candlestick chart plotting with PyQt6 — mplfinance-compatible API
Project description
Interactive candlestick chart plotting with PyQt6 — drop-in replacement for mplfinance with rich interactivity.
Features
- 📈 Candlestick, OHLC bar, line, and hollow-candle chart types
- 📊 Optional volume subplot
- 🔍 Mouse-wheel zoom and click-drag pan
- 🎯 Crosshair cursor with live OHLC / volume readout
- 📐 Moving average overlays (
mavparameter) - 🎨 Built-in styles (
default,charles,mike,yahoo,classic,nightclouds) - 🖼️
make_addplot()for overlaying custom data (line, scatter & segments) - 🔀
make_segments()for overlapping broken-line overlays (e.g. Knoxville Divergence) - 💾
savefig()support (PNG / JPG / BMP) - 🔁
returnfigmode for embedding in your own PyQt6 application - 🔴
live_plot()for animated / live-updating charts - ✅ mplfinance-compatible function signatures
Installation
Install from PyPI
The recommended way to install wickly:
pip install wickly
Install from source
Clone the repository and install with pip:
git clone https://github.com/ShreyanshDarshan/wickly.git
cd wickly
pip install .
Or in editable/development mode (includes pytest and build):
pip install -e ".[dev]"
Quick Start
import pandas as pd
import wickly
# DataFrame must have a DatetimeIndex and columns: Open, High, Low, Close (and optionally Volume)
df = pd.read_csv("your_data.csv", index_col=0, parse_dates=True)
# Candlestick chart with volume and moving averages — same API as mplfinance
wickly.plot(df, type='candle', volume=True, mav=(10, 20), style='yahoo', title='My Chart')
Documentation
Full API reference, quickstart guide, and examples are available at wickly.readthedocs.io.
Contributing
Contributions are welcome — bug reports, feature requests, documentation improvements, and pull requests all appreciated.
1. Fork & clone
git clone https://github.com/ShreyanshDarshan/wickly.git
cd wickly
2. Set up the development environment
Create and activate a dedicated environment (conda shown; plain venv works too):
conda create -n wickly python=3.11
conda activate wickly
pip install -e ".[dev,docs]"
3. Project layout
wickly/
├── src/wickly/ # Package source
│ ├── __init__.py # Public API surface
│ ├── plotting.py # Top-level plot() function
│ ├── chart_widget.py # PyQt6 CandlestickWidget
│ ├── addplot.py # make_addplot() & make_segments() helpers
│ ├── styles.py # Built-in styles & make_style()
│ └── _utils.py # Data validation utilities
├── tests/ # pytest test suite
├── docs/ # Sphinx documentation source
├── examples/ # Runnable example scripts
├── pyproject.toml # Project metadata & dependencies
└── .readthedocs.yaml # Read the Docs configuration
4. Run the tests
pytest tests/ -v
All 41 tests should pass. Add new tests under tests/ for any code you contribute.
5. Build the documentation locally
# HTML output → docs/_build/html/index.html
python -m sphinx -b html docs docs/_build/html
# Open in the default browser (Windows)
start docs/_build/html/index.html
# Open in the default browser (macOS / Linux)
open docs/_build/html/index.html
Build must succeed with zero warnings (-W flag):
python -m sphinx -b html docs docs/_build/html -W
6. Run the examples
python examples/basic_candle.py # Basic candlestick + volume + MAs
python examples/chart_types.py # All four chart types in sequence
python examples/addplot_overlay.py # Bollinger Bands & scatter signals
python examples/live_chart.py # Live / animated chart demo
7. Adding a new built-in style
- Add an entry to
_BUILTIN_STYLESinsrc/wickly/styles.pyfollowing the existing key schema. - Add the style name to
TestAvailableStyles.test_all_builtins_presentintests/test_styles.py. - Document it in the styles table in
docs/styles.rst.
8. Code style
- Format with black (
pip install black; black src/ tests/). - Type-annotate all public functions.
- Write NumPy-style docstrings — they are picked up by Sphinx autodoc.
9. Submitting a pull request
- Branch off
main:git checkout -b feat/my-feature - Make your changes, add tests, update docs.
- Ensure
pytest tests/ -vis all green andsphinx -Wbuilds cleanly. - Open a PR against
mainwith a clear description of what changed and why.
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wickly-0.1.1.tar.gz.
File metadata
- Download URL: wickly-0.1.1.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62e740e3c3069299e16ee3076257027f0cbecd9ed2ebaba3085e43516c6d133d
|
|
| MD5 |
2612034268b6a41898c87efa92d13491
|
|
| BLAKE2b-256 |
d352990f94eeaa64233851a78d792030df211a7fbd3db6fd13dac0538665df1c
|
Provenance
The following attestation bundles were made for wickly-0.1.1.tar.gz:
Publisher:
publish.yml on ShreyanshDarshan/wickly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wickly-0.1.1.tar.gz -
Subject digest:
62e740e3c3069299e16ee3076257027f0cbecd9ed2ebaba3085e43516c6d133d - Sigstore transparency entry: 1293593725
- Sigstore integration time:
-
Permalink:
ShreyanshDarshan/wickly@b4505e4ad785cef0875adb31c8fc5fa03c3783c5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShreyanshDarshan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b4505e4ad785cef0875adb31c8fc5fa03c3783c5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wickly-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wickly-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fa45f0f3680602fed64cd8bbd8ab7e423e6bf431cbf96f82f02e334cb8e0be
|
|
| MD5 |
dbdcc84bbfd847e2b28733d9b50b8a58
|
|
| BLAKE2b-256 |
c39a0b1d3deb6160da3563995552249a30ff9126e0e43843e1b4805faa077020
|
Provenance
The following attestation bundles were made for wickly-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ShreyanshDarshan/wickly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wickly-0.1.1-py3-none-any.whl -
Subject digest:
c4fa45f0f3680602fed64cd8bbd8ab7e423e6bf431cbf96f82f02e334cb8e0be - Sigstore transparency entry: 1293593734
- Sigstore integration time:
-
Permalink:
ShreyanshDarshan/wickly@b4505e4ad785cef0875adb31c8fc5fa03c3783c5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ShreyanshDarshan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b4505e4ad785cef0875adb31c8fc5fa03c3783c5 -
Trigger Event:
release
-
Statement type: