TradeBot Check
Trading involves a risk of losing money. Nothing on this site is financial advice and past results do not guarantee future results. Risk disclosure
Market data

mplfinance

Python package of matplotlib utilities to plot candlestick, OHLC, Renko and Point and Figure charts with volume and moving averages from a pandas DataFrame.

matplotlib/mplfinance★ 4,479 stars last commit 2024-08-08
Our take

Turn a price DataFrame into a clean candlestick chart with volume and moving averages in a single mpf.plot() call.

Who it is for

Python users who want to visualize prices, check backtest signals or add charts to reports and bot alerts.

Strengths

  • One call, mpf.plot(), draws OHLC bars, candles, line, Renko or Point and Figure charts from a DataFrame with a DatetimeIndex.
  • Volume panel with volume=True and moving averages with the mav keyword.
  • Custom studies and extra panels through addplot, with guides for styling, saving plots and real-time animation.
  • Installs with pip install --upgrade mplfinance; it needs matplotlib and pandas.

Good to know

  • The license is a custom agreement rather than a standard OSI license, so read it before commercial use.
  • The last code change on GitHub was in August 2024, so check the repository for current activity.
  • The old mpl_finance API is deprecated; old imports must move to mplfinance.original_flavor, which the README says may be removed someday.
  • It draws static charts with matplotlib; it is not a data source or a backtesting engine.

Custom bots are coming soon
We are preparing a service to build bots on tools like this one. Follow our Telegram channel to know when it opens.

Notify me

Real-life uses

A daily candlestick chart of your watchlist sent to your phone

A script downloads daily prices for your watchlist, draws candlesticks with volume and a moving average, and sends the chart image so you can review setups quickly. Illustrative only, never a promise of returns.

🕯️ Daily charts (example): 5 watchlist charts attached, 20-day average drawn. Review the rules and test with fees before acting.

Compare it with others

Guides that use it

Quick answers

How much does mplfinance cost?

Free (custom Matplotlib Development Team license agreement, see the LICENSE file). Prices change, so check the official website before you decide.

Is mplfinance open source?

Not under an OSI-approved license. License: Custom license agreement (Matplotlib Development Team).

Who is mplfinance for?

Python users who want to visualize prices, check backtest signals or add charts to reports and bot alerts.

What is mplfinance written in?

mplfinance is written in Python.

What should I know before using mplfinance?

The license is a custom agreement rather than a standard OSI license, so read it before commercial use. The last code change on GitHub was in August 2024, so check the repository for current activity. The old mpl_finance API is deprecated; old imports must move to mplfinance.original_flavor, which the README says may be removed someday. It draws static charts with matplotlib; it is not a data source or a backtesting engine.

Want a bot like this when custom bots open? Get notified · All comparisons · Guides

Sources

Every fact on this page comes from these sources, checked on 2026-12-01. If something has changed, the source wins.

  1. https://raw.githubusercontent.com/matplotlib/mplfinance/master/README.md: plot types, volume, moving averages, addplot, install, new API versus old mpl-finance
  2. https://api.github.com/repos/matplotlib/mplfinance: about 4,500 stars, last push 2024-08-08, not archived
  3. https://raw.githubusercontent.com/matplotlib/mplfinance/master/LICENSE: custom license agreement from the Matplotlib Development Team, not a standard named license

Alternatives in Market data