API reference
Classic technical analysis stock charts in Python, built on matplotlib.
The pages in this section are generated from the source docstrings by scripts/make-api-docs.py.
Modules
- mplchart.chart — the
Chartclass: plotting, panes, rendering - mplchart.primitives — drawing primitives: price renderers, indicator renderers, overlays, and layout controls
- mplchart.indicators — technical analysis indicators for the pandas pipeline, named
SMA,EMA, etc. - mplchart.expressions — polars expression factories, the polars-pipeline counterparts of the indicators
- mplchart.styles — chart styling: the
Stylespec and runtimeStyler
See also Pandas and polars backends for how the two data pipelines relate.
Conventions
pricesis a pandas or polars DataFrame with columnsopen,high,low,close,volume(lower case; useChart(normalize=True)to normalize other layouts)- Indicators and expressions use upper case names:
SMA,EMA,MACD - An indicator or expression is plotted directly (auto-plotted) or bound to a renderer primitive:
LinePlot(SMA(50))or the equivalent operator formSMA(50) @ LinePlot() - Indicators chain with the
|operator:EMA(20) | ROC(1)