Skip to content

Commit 7bb2f9d

Browse files
Merge pull request #112 from DanielGoldfarb/master
implement "lines" and other changes
2 parents 0b88785 + fc31192 commit 7bb2f9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+48630
-256
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- Contributing can as simple as **asking questions**, participating in discussions, suggesting enhancements, etc. **All of these are valuable!** There are many ways to contribute.
2+
3+
- All of the usual/typical open source contribution guidelines apply (see for example, **[Matplotlib Contributing](https://matplotlib.org/3.1.1/devel/contributing.html)** and **[Open Source Guide to Contributing](https://opensource.guide/how-to-contribute/)**)
4+
so here, on this page, we will mention just a few items for which we may be particular in **mplfinance**.
5+
6+
7+
- Coding:
8+
- If you write code, please don't use tabs; rather use spaces.
9+
- If you add a significant feature, that is a feature for which explaining its usage takes more than just a few sentences, please also create a "tutorial notebook" for that feature. **[For examples of tutorial notebooks, please see the jupyter notebooks in the examples folder.](https://github.com/matplotlib/mplfinance/tree/master/examples)**
10+
- If you add a significant feature, please also create a regression test file **[in the tests folder](https://github.com/matplotlib/mplfinance/tree/master/tests)**, similar to the other regression tests that are there. *Often, the simplest way to do this is to take a few of the examples from the feature's "tutorial notebook"* (see previous point).

README.md

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111

1212
---
1313

14-
# Contents
14+
# <a name="tutorials"></a>Contents and Tutorials
1515

1616
- **[The New API](https://github.com/matplotlib/mplfinance#newapi)**
17-
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
18-
- **[Adding Your Own Technical Studies to Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
19-
- **[Saving the Plot to a File](https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb)**
20-
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/customization_and_styles.ipynb)**
21-
- **[Price-Movement Plots (Renko, P&F, etc)](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)**
22-
- Technical Studies (presently in development)
23-
- **[Latest Release Info](https://github.com/matplotlib/mplfinance#release)**
17+
- **[Tutorials](https://github.com/matplotlib/mplfinance#tutorials)**
18+
- **[Basic Usage](https://github.com/matplotlib/mplfinance#usage)**
19+
- **[Adding Your Own Technical Studies to Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb)**
20+
- **[Saving the Plot to a File](https://github.com/matplotlib/mplfinance/blob/master/examples/savefig.ipynb)**
21+
- **[Customizing the Appearance of Plots](https://github.com/matplotlib/mplfinance/blob/master/examples/customization_and_styles.ipynb)**
22+
- **[Price-Movement Plots (Renko, P&F, etc)](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)**
23+
- **[Trends, Support, Resistance, and Trading Lines](https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb)**
24+
- **[Latest Release Info](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md)**
2425
- **[Some Background History About This Package](https://github.com/matplotlib/mplfinance#history)**
2526
- **[Old API Availability](https://github.com/matplotlib/mplfinance#oldapi)**
2627

@@ -568,22 +569,6 @@ mpf.plot(df[700:850],type='bars',volume=True,mav=(20,40))
568569

569570
For more examples of using mplfinance, please see the jupyter notebooks in the **[`examples`](https://github.com/matplotlib/mplfinance/blob/master/examples/)** directory.
570571

571-
---
572-
573-
# <a name="release"></a>Release Notes
574-
575-
| Version | Description | Release Date |
576-
|:---------|:-------------|:---------------|
577-
| 0.12.3a3 | - `linecolor` kwarg for line plots<br> - implement save figure to in-memory buffer<br> -- Thank you Caleb Coffin @coffincw for contributing the above. | 2020-03-04 |
578-
| 0.12.3a2 | - implement custom markers (issue#30)<br> - fix minor issue with chart `type` validator<br> -- Thank you Amir Atashin @amiaty for contributing the above.<br> - add internal functions: `_bypass_kwarg_validation()` and `_kwarg_not_implemented()` | 2020-02-21 |
579-
| 0.12.3a1 | - fix issue#28: math.log crash on zero in data<br> - remove "Implemented" field from kwarg dicts<br> - yahoo style show colors for `ohlc bars` | 2020-02-16 |
580-
| 0.12.3a0 | - kwarg `block=False` for non-blocking call to `mpf.plot()`<br> - customize aspect ratio, figure title, y-labels<br> - customize colors and other `style` aspects of plot<br> - `no_xgaps` now defaults to True: use `show_nontrading=True` to set no_xgaps to false<br> - secondary y-axis available to `make_addplot()`<br> - bug fix for volume widths | 2020-02-12 |
581-
| 0.12.0a3 | Increase mav limit from 3 to 7 different mavs | 2020-01-16 |
582-
| 0.12.0a2 | Ability to save plot to a file (pdf, svg, png, jpg, ...) | 2020-01-14 |
583-
| 0.12.0a1 | Ability to 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 |
584-
| 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 |
585-
| 0.10.x | Old mpl-finance API set up as its own package<br> (i.e. removed from the matplotlib package). | 2016-09-08 |
586-
587572
---
588573

589574
## <a name="history"></a>Some History
@@ -594,7 +579,12 @@ It is my intention to archive the `matplotlib/mpl-finance` repository soon, and
594579
---
595580
### <a name="oldapi"></a>old API availability
596581

597-
With this new ` mplfinance ` package installed, in addition to the new API, users can still access the old API (at least for the next several months) by changing their import statments<br>
582+
**With this new ` mplfinance ` package installed, in addition to the new API, users can still access the old API**.<br> The old API may be removed some day, but for the foreseeable future we will keep it ... at least until we are very confident that users of the old API can accomplish the same things with the new API.
583+
584+
---
585+
586+
To access the old API with the new ` mplfinance ` package installed, change the old import statments
587+
598588
**from:**
599589

600590
```python

RELEASE_NOTES.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
- **v0.12.4a0 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-05-01**
2+
3+
- regression tests for new API
4+
- **[Renko plots](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)** [(issue #11)](https://github.com/matplotlib/mplfinance/issues/11) &nbsp;&nbsp;&nbsp;&nbsp;(Thank you [Caleb Coffin @coffincw](https://github.com/coffincw))
5+
- **`style='binance'`** &nbsp;&nbsp;&nbsp;&nbsp;(Thank you [@akgna](https://github.com/akgnah))
6+
- return Figure and Axes (**`return_fig=True`**) ([issue #46](https://github.com/matplotlib/mplfinance/issues/46))
7+
- check that inputs are all float, and rename IPython.display.Iamge to avoid confusion with PIL.Image
8+
- ability to **`return_calculated_values=True`** ([issue #63](https://github.com/matplotlib/mplfinance/issues/63)) &nbsp;&nbsp;&nbsp;&nbsp;(Thank you [@WHug0](https://github.com/WHug0))
9+
- **[Point and Figure (`type='pnf'`) plots.](https://github.com/matplotlib/mplfinance/blob/master/examples/price-movement_plots.ipynb)** &nbsp;&nbsp;&nbsp;&nbsp;(Thank you [Caleb Coffin @coffincw](https://github.com/coffincw))
10+
- custom column names &nbsp;&nbsp;&nbsp;&nbsp;(Thank you [@borgstrom](https://github.com/borgstrom))
11+
- **`set_ylim`** and **`set_ylim_panelB`** kwargs
12+
- **`hlines`**, **`vlines`**, **`alines`**, **`tlines`** **[Trend, Support, Resistance, and Trading/Signal lines](https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb)**
13+
- (Thank you [Aaron Soellinger @free-soellingeraj](https://github.com/free-soellingeraj) for writing regression tests for this.)
14+
15+
16+
17+
---
18+
- **v0.12.3a3 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-03-04**
19+
20+
- `linecolor` kwarg for line plots &nbsp;&nbsp;&nbsp;&nbsp;(Thank you Caleb Coffin @coffincw)
21+
- implement save figure to in-memory buffer &nbsp;&nbsp;&nbsp;&nbsp;(Thank you Caleb Coffin @coffincw)
22+
---
23+
- **v0.12.3a2 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-02-21**
24+
25+
- implement custom markers (issue#30) &nbsp;&nbsp;&nbsp;&nbsp;(Thank you Amir Atashin @amiaty)
26+
- fix minor issue with chart `type` validator &nbsp;&nbsp;&nbsp;&nbsp;(Thank you Amir Atashin @amiaty)
27+
- add internal functions: `_bypass_kwarg_validation()` and `_kwarg_not_implemented()`
28+
---
29+
- **v0.12.3a1 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-02-16**
30+
31+
- fix issue#28: math.log crash on zero in data
32+
- remove "Implemented" field from kwarg dicts
33+
- yahoo style show colors for `ohlc bars`
34+
---
35+
- **v0.12.3a0 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-02-12**
36+
37+
- kwarg `block=False` for non-blocking call to `mpf.plot()`
38+
- customize aspect ratio, figure title, y-labels
39+
- customize colors and other `style` aspects of plot
40+
- `no_xgaps` now defaults to True: use `show_nontrading=True` to set no_xgaps to false
41+
- secondary y-axis available to `make_addplot()`
42+
- bug fix for volume widths
43+
---
44+
- **v0.12.0a3 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-01-16**
45+
46+
- Increase mav limit from 3 to 7 different mavs
47+
---
48+
- **v0.12.0a2 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-01-14**
49+
50+
- Ability to save plot to a file (pdf, svg, png, jpg, ...)
51+
---
52+
- **v0.12.0a1 &nbsp;&nbsp;&nbsp;&nbsp; Released 2020-01-09**
53+
54+
- Ability to plot arbitrary user data (in addition to basic OHLCV data).
55+
- both line and scatter plots available.
56+
- optionally plot on either the "main" or "lower" (aka "volume") axis.
57+
---
58+
- **v0.11.x &nbsp;&nbsp;&nbsp;&nbsp; Released 2019-12-20**
59+
60+
- Basic Plotting from Pandas DataFrame of OHLC bars and candlesticks.
61+
- optional display of volume
62+
- optional display of (up to 3 different) moving averages.
63+
- old API still available by importing from "mplfinance/original_flavor"
64+
---
65+
- **v0.10.x &nbsp;&nbsp;&nbsp;&nbsp; Released 2016-09-08**
66+
67+
- Old mpl-finance API set up as its own package<br>(i.e. removed from the matplotlib package).

TODO.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Wish List - TODO - To Prioritize
2+
3+
1. pass in Figure and Axes enhancement
4+
2. clean up code for easier maintenance
5+
3. debug issue#77:
6+
- ylimit diff scatter() vs plot()
7+
- ylimit vs how subplot is created.
8+
4. how use configuration file
9+
5. auto-pull updates for config file. possible?
10+
6. collect anonymous data on feature usage
11+
7. wrappers for technical studies.
12+
8. force version change with each Pull Request
13+
9. tagging releases
14+
10. documentation (replace old `https://matplotlib.org/api/finance_api.html`)
15+
11. make code more efficient (ex: tlines reconstructing data frame).
16+
12. add 'description' to valid kwargs table, and kwarg to print
17+
all kwargs information (kwarg and short description).
18+

examples/customization_and_styles.ipynb

Lines changed: 33409 additions & 55 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)