Skip to content

Commit 511019c

Browse files
Merge branch 'master' into master
2 parents 2960a06 + 0b7b663 commit 511019c

File tree

3 files changed

+1152
-24
lines changed

3 files changed

+1152
-24
lines changed

README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[![Build Status](https://travis-ci.org/matplotlib/mplfinance.svg?branch=master)](https://travis-ci.org/matplotlib/mplfinance)
22

33
# mplfinance
4-
## matplotlib utilities for the visualization, and visual analysis, of financial data
4+
matplotlib utilities for the visualization, and visual analysis, of financial data
55

6-
---
7-
8-
# Installation
9-
##    `pip install --upgrade mplfinance`
10-
- mplfinance requires [matplotlib](https://pypi.org/project/matplotlib/) and [pandas](https://pypi.org/project/pandas/)
6+
## Installation
7+
```bash
8+
pip install --upgrade mplfinance
9+
```
10+
- mplfinance requires [matplotlib](https://pypi.org/project/matplotlib/) and [pandas](https://pypi.org/project/pandas/)
1111

1212
---
1313

14-
# <a name="announcements"></a>Announcing Version 0.12.7
15-
### [External Axes Mode and Animation Support.](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md)
14+
## <a name="announcements"></a>Announcing Version 0.12.7
15+
[External Axes Mode and Animation Support.](https://github.com/matplotlib/mplfinance/blob/master/RELEASE_NOTES.md)
1616

1717
---
1818

19-
# <a name="tutorials"></a>Contents and Tutorials
19+
## <a name="tutorials"></a>Contents and Tutorials
2020

2121
- **[The New API](https://github.com/matplotlib/mplfinance#newapi)**
2222
- **[Tutorials](https://github.com/matplotlib/mplfinance#tutorials)**
@@ -59,7 +59,7 @@ I am very interested to hear from you regarding what you think of the new `mplfi
5959

6060
---
6161

62-
# <a name="usage"></a>Basic Usage
62+
## <a name="usage"></a>Basic Usage
6363
Start with a Pandas DataFrame containing OHLC data. For example,
6464

6565

@@ -171,7 +171,6 @@ daily.tail(3)
171171
</table>
172172

173173

174-
---
175174
<br>
176175

177176
After importing mplfinance, plotting OHLC data is as simple as calling `mpf.plot()` on the dataframe
@@ -186,7 +185,6 @@ mpf.plot(daily)
186185
![png](https://raw.githubusercontent.com/matplotlib/mplfinance/master/readme_files/readme_4_1.png)
187186

188187

189-
---
190188
<br>
191189

192190
The default plot type, as you can see above, is `'ohlc'`. Other plot types can be specified with the keyword argument `type`, for example, `type='candle'`, `type='line'`, `type='renko'`, or `type='pnf'`
@@ -385,7 +383,7 @@ intraday.tail(3)
385383

386384

387385

388-
The above dataframe contains Open,High,Low,Close data at 1 minute intervervals for the S&P 500 stock index for November 5, 6, 7 and 8, 2019. Let's look at the last hour of trading on November 6th, with a 7 minute and 12 minute moving average.
386+
The above dataframe contains Open,High,Low,Close data at 1 minute intervals for the S&P 500 stock index for November 5, 6, 7 and 8, 2019. Let's look at the last hour of trading on November 6th, with a 7 minute and 12 minute moving average.
389387

390388

391389
```python
@@ -584,11 +582,9 @@ My name is Daniel Goldfarb. In November 2019, I became the maintainer of `matpl
584582
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`.
585583

586584
---
587-
### <a name="oldapi"></a>old API availability
588-
589-
**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.
585+
## <a name="oldapi"></a>Old API availability
590586

591-
---
587+
**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 someday, 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.
592588

593589
To access the old API with the new ` mplfinance ` package installed, change the old import statments
594590

@@ -612,10 +608,3 @@ where `<method>` indicates the method you want to import, for example:
612608
```python
613609
from mplfinance.original_flavor import candlestick_ohlc
614610
```
615-
616-
---
617-
618-
619-
```python
620-
621-
```

examples/scratch_pad/trend_line_extrapolation.ipynb

Lines changed: 1133 additions & 0 deletions
Large diffs are not rendered by default.

src/mplfinance/_styles.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def _valid_make_marketcolors_kwargs():
190190
or isinstance(value,str)
191191
or mcolors.is_color_like(value) },
192192

193+
'vcdopcod' : { 'Default' : False,
194+
'Validator' : lambda value: isinstance(value,bool) },
195+
193196
'inherit' : { 'Default' : False,
194197
'Validator' : lambda value: isinstance(value,bool) },
195198

@@ -272,6 +275,9 @@ def _check_and_set_mktcolor(candle,**kwarg):
272275
if config['alpha'] is not None:
273276
marketcolors.update({'alpha':config['alpha']})
274277

278+
if config['vcdopcod'] is not None:
279+
marketcolors.update({'vcdopcod':config['vcdopcod']})
280+
275281
return marketcolors
276282

277283
def write_style_file(style,filename):

0 commit comments

Comments
 (0)