You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**[Some Background History About This Package](https://github.com/matplotlib/mplfinance#history)**
23
+
-**[Old API Availability](https://github.com/matplotlib/mplfinance#oldapi)**
24
+
25
+
---
26
+
## <aname="newapi"></a>The New API
27
+
28
+
This repository, `matplotlib/mplfinance`, contains a new **matplotlib finance** API that makes it easier to create financial plots. It interfaces nicely with **Pandas** DataFrames.
29
+
30
+
*More importantly, **the new API automatically does the extra matplotlib work that the user previously had to do "manually" with the old API.*** (The old API is still available within this package; see below).
31
+
32
+
The conventional way to import the new API is as follows:
33
+
34
+
```python
35
+
import mplfinance as mpf
36
+
```
37
+
38
+
The most common usage is then to call
39
+
40
+
```python
41
+
mpf.plot(data)
42
+
```
43
+
44
+
where `data` is a `Pandas DataFrame` object containing Open, High, Low and Close data, with a Pandas `DatetimeIndex`.
45
+
46
+
Details on how to call the new API can be found below under **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**, as well as in the jupyter notebooks in the **[examples](https://github.com/matplotlib/mplfinance/blob/master/examples/)** folder.
47
+
48
+
I am very interested to hear from you regarding what you think of the new `mplfinance`, plus any suggestions you may have for improvement. You can reach me at [email protected]
For more examples of using mplfinance, please see the jupyter notebooks in the `examples` directory.
505
531
506
532
---
507
-
508
-
## COMING SOON:
509
-
510
-
- customize appearance of plot (colors, date format, etc)
511
-
- show trading signals on plot
512
-
- technical studies, such as:
513
-
- Trading Envelope, Bollinger Bands
514
-
- MACD
515
-
- save plot to file
516
533
517
534
# <aname="release"></a>Release Notes
518
535
519
536
| Version | Description | Release Date |
520
537
|----------|--------------|----------------|
521
538
| 0.12.x | Ability plot arbitrary user data (in addition to basic OHLCV data).<br> - both line and scatter plots available.<br> - optionally plot on either the "main" or "lower" (aka "volume") axis. | 2020-01-09 |
522
-
| 0.11.x | Basic Plotting from Pandas DataFrame of OHLC bars and candlesticks.<br> - optional display of volume<br> - optional display of (up to 3 different) moving averages.<br> - old API still available by importing from "mplfinance/original_flavor" | 2019-13-20 |
539
+
| 0.11.x | Basic Plotting from Pandas DataFrame of OHLC bars and candlesticks.<br> - optional display of volume<br> - optional display of (up to 3 different) moving averages.<br> - old API still available by importing from "mplfinance/original_flavor" | 2019-12-20 |
523
540
| 0.10.x | Old mpl-finance API set up as its own package<br> (i.e. removed from the matplotlib package). | 2016-09-08 |
524
541
525
542
---
@@ -529,28 +546,6 @@ My name is Daniel Goldfarb. In November 2019, I became the maintainer of `matpl
529
546
530
547
It is my intention to archive the `matplotlib/mpl-finance` repository soon, and direct everyone to `matplotlib/mplfinance`. The main reason for the rename is to avoid confusion with the hyphen and the underscore: As it was, `mpl-finance` was *installed with the hyphen, but imported with an underscore `mpl_finance`.* Going forward it will be a simple matter of both installing and importing `mplfinance`.
531
548
532
-
## The new API
533
-
534
-
At present (Dec 2019) this repository, `matplotlib/mplfinance`, contains an initial 'alpha', version of the new API for people to play with and provide feedback or pull requests for enhancements.
535
-
536
-
My own take on the old `mpl-finance` API is that the methods were too low-level, and too cumbersome to use. The new API in this current package automatically does the extra matplotlib work that the caller previously had to do "manually, on their own" with the old API.
537
-
538
-
The conventional way to import the new API is as follows:
539
-
540
-
```python
541
-
import mplfinance as mpf
542
-
```
543
-
544
-
The most common usage is to then call `mpf.plot(data)` where `data` is a `Pandas DataFrame` object containing Open, High, Low and Close data, with a Pandas `DatetimeIndex`.
545
-
546
-
---
547
-
### For details on how to call the new API, see the jupyter notebook(s) in the examples folder:
I am very interested to hear from you regarding how you were using the old `mpl-finance` (if you were), what you think of the new `mplfinance`, plus any suggestions you may have for improvement. You can reach me at [email protected]
553
-
554
549
---
555
550
### <aname="oldapi"></a>old API availability
556
551
@@ -572,4 +567,3 @@ where `<method>` indicates the method you want to import, for example:
572
567
```python
573
568
from mplfinance.original_flavor import candlestick_ohlc
0 commit comments