Hexital - Incremental Technical Analysis Library
Documentation: https://merlinr.github.io/Hexital/
Source Code: https://github.com/MerlinR/Hexital
Hexital is a fast, zero-dependency Python library for technical analysis. It computes indicators incrementally — append a candle, get the new reading — instead of recalculating the entire series each time.
- Fast — built for live feeds and append-one-candle workflows
- Easy — dicts, lists, or
Candleobjects as input - Versatile — indicators, patterns, candlestick transforms, analysis helpers
- Lightweight — no pandas or numpy required at runtime
Beta: Breaking changes are still possible. See the Release Notes.
Installation
pip install hexital
Development branch:
pip install git+https://github.com/merlinr/hexital.git@development
Choose your path
| I want to… | Use | Guide |
|---|---|---|
| Compute one indicator on a live feed | EMA(...).append() |
Quick Start |
| Run several indicators on one candle stream | Hexital(...) |
Strategies |
| Load candles from CSV, Pandas, timestamps | Candle.from_dicts() etc. |
Candles |
| Build 5m bars from 1m data | timeframe= on indicator + label on candles |
Candles · Features |
| Check crossovers, rising/falling | hexital.analysis |
Analysis |
| Heikin-Ashi or other candle transforms | candlestick= |
Candlesticks |
| Write my own indicator | subclass Indicator |
Custom indicators |
| Browse what's built in | catalogues | Indicators · Patterns |
New here? Quick Start walks through the examples below step by step.
Getting started
Single indicator
from hexital import EMA, Candle
candles = Candle.from_dicts([
{"open": 17213, "high": 2395, "low": 7813, "close": 3615, "volume": 19661},
{"open": 1301, "high": 3007, "low": 11626, "close": 19048, "volume": 28909},
])
ema = EMA(candles=candles, period=3)
ema.calculate()
print(ema.reading()) # 8408.7552
# Append updates the reading automatically
ema.append(Candle.from_dict({"open": 19723, "high": 4837, "low": 11631, "close": 6231, "volume": 38993}))
print(ema.reading()) # 7319.8776
Hexital — multiple indicators, one candle stream
Use [Hexital][hexital.core.hexital.Hexital] when a strategy needs several indicators fed from the same candles:
from hexital import EMA, WMA, Candle, Hexital
candles = Candle.from_dicts([
{"open": 17213, "high": 2395, "low": 7813, "close": 3615, "volume": 19661},
{"open": 1301, "high": 3007, "low": 11626, "close": 19048, "volume": 28909},
{"open": 12615, "high": 923, "low": 7318, "close": 1351, "volume": 33765},
])
strategy = Hexital("Demo Strat", candles, [
WMA(name="WMA", period=8),
EMA(period=3),
])
strategy.calculate()
print(strategy.reading("EMA_3")) # 8408.7552
print(strategy.reading("WMA")) # 9316.4722
strategy.append(Candle.from_dict({"open": 19723, "high": 4837, "low": 11631, "close": 6231, "volume": 38993}))
print(strategy.reading("EMA_3")) # 7319.8776
print(strategy.reading("WMA")) # 8934.9722
Named indicators keep stable keys (WMA). Unnamed indicators get generated names from type and settings (EMA_3 = EMA with period 3). Nested dict fields use : at lookup time (e.g. MACD_12_26_9:signal).
What's included
Indicators
40+ incremental indicators for common strategies. Full reference: indicator catalogue.
ADX · AO · Amorph · AROON · ATR · BBANDS / BandWidth · CCI · ChandelierExit / CKSP · CMF · CMO · COPC · Counter · DEMA · Donchian · EMA · Fisher · HL / HLA / HLCA · HMA · Ichimoku · JMA · KAMA · KC · KST · LinearRegression / RegressionSlope / RegressionChannel · MACD · MFI · MOP · NATR · OBV · PPO · PSAR · PivotPoints · RMA · ROC · RSI · RVI · SMA · Squeeze / SqueezePro · STDEV / STDEVT · STOCH · Supertrend · TEMA · TR · TRIX · TSI · UO · Vortex · VWAP · VWMA · WillR · WMA · ZScore
Candlestick patterns
Pattern detection on candle sequences — full catalogue.
doji · dojistar · hammer · inverted_hammer
Candlestick types
Transform incoming candles before indicators run (e.g. Heikin-Ashi) — catalogue.
HeikinAshi
Movements
Pine Script–style helpers for indicator behaviour over time — full catalogue.
positive / negative · rising / falling · mean_rising / mean_falling · highest / lowest · highestbar / lowestbar · cross / crossover / crossunder · value_range
from hexital.analysis import cross, rising
rising(ema, "EMA_3", length=8)
cross(strategy, "EMA_3", "WMA")
Testing & performance
Accuracy
Every built-in indicator is unit tested against Pandas-TA as a source of truth. Values are compared with a small tolerance where floating-point or formula differences apply.
When to use Hexital vs Pandas-TA
| Use case | Better fit |
|---|---|
| Live / streaming — append one candle at a time | Hexital |
| Large bulk backtest — load full history once, vectorise | Pandas-TA |
Hexital only calculates missing readings on append (O(1) per update). Libraries built on pandas typically recompute or reshape the full frame on each append, which gets slower as history grows.
In internal benchmarks, Hexital stays roughly flat as candle count increases during incremental updates, while Pandas-TA time grows with series length. For bulk calculation on large static datasets, Pandas-TA is often faster.
More detail and charts: Features.
Learn more
- Features — chaining, custom indicators, multi-timeframe, benchmarks
- API Reference
- Design & alternatives — vs Pandas-TA and TALipp
License
MIT — see LICENSE.
Metadata
Release files for hexital 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hexital-4.1.0.tar.gz | 60.4 kB | With provenance | Details for hexital-4.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hexital-4.1.0-py3-none-any.whl | Python 3 | none | any | Details for hexital-4.1.0-py3-none-any.whl |
Total release size: 163.7 kB
Release files / hexital-4.1.0.tar.gz
| Download URL | hexital-4.1.0.tar.gz |
|---|---|
| Size | 60.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9fb003cff7a0f1efb1b2c3c8981999537c165dffd675f3f51510f575f740f4f
|
|
BLAKE2b-256 checksum How to use checksums |
b235793feda35a244d4de1a94f3787300bfb2ced026a7c7559259686751057ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / hexital-4.1.0-py3-none-any.whl
| Download URL | hexital-4.1.0-py3-none-any.whl |
|---|---|
| Size | 103.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94eb299d9cf0fb28807b169e2d8e7eec64027fcdaac682e1e7f958633cbe7b5c
|
|
BLAKE2b-256 checksum How to use checksums |
4020b1847d6fea3f69ad2680177de0a757531d58ca1001466f0014cd7b5ca505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logSecurity for hexital 4.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for hexital-4.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.