Skip to content

Commit c036d31

Browse files
Merge pull request #321 from DanielGoldfarb/issue320
support `vcdopcod` in `mpf.make_marketcolors`
2 parents 871448f + d40f76c commit c036d31

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/mplfinance/_styles.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ def _valid_make_mpf_style_kwargs():
9494
'rc' : { 'Default' : None,
9595
'Validator' : lambda value: isinstance(value,dict) },
9696

97+
'style_name' : { 'Default' : None,
98+
'Validator' : lambda value: isinstance(value,str) },
99+
97100
}
98101
_validate_vkwargs_dict(vkwargs)
99102
return vkwargs
@@ -182,6 +185,9 @@ def _valid_make_marketcolors_kwargs():
182185
or isinstance(value,str)
183186
or mcolors.is_color_like(value) },
184187

188+
'vcdopcod' : { 'Default' : False,
189+
'Validator' : lambda value: isinstance(value,bool) },
190+
185191
'inherit' : { 'Default' : False,
186192
'Validator' : lambda value: isinstance(value,bool) },
187193

@@ -261,4 +267,7 @@ def _check_and_set_mktcolor(candle,**kwarg):
261267
if config['alpha'] is not None:
262268
marketcolors.update({'alpha':config['alpha']})
263269

270+
if config['vcdopcod'] is not None:
271+
marketcolors.update({'vcdopcod':config['vcdopcod']})
272+
264273
return marketcolors

src/mplfinance/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
version_info = (0, 12, 7, 'alpha', 4)
2+
version_info = (0, 12, 7, 'alpha', 5)
33

44
_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}
55

0 commit comments

Comments
 (0)