Skip to content

Commit 00f4b4a

Browse files
committed
add vcedge to make_marketcolors()
1 parent 493811d commit 00f4b4a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/mplfinance/_styles.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ def _valid_make_marketcolors_kwargs():
260260
or isinstance(value,str)
261261
or _mpf_is_color_like(value) },
262262

263+
'vcedge' : { 'Default' : None,
264+
'Description' : "color of volume bars edge; may be single color,"+
265+
" or may be dict with keys 'up' and 'down'",
266+
'Validator' : lambda value: isinstance(value,dict)
267+
or isinstance(value,str)
268+
or _mpf_is_color_like(value) },
269+
263270
'vcdopcod' : { 'Default' : False,
264271
'Description' : 'True/False volume color depends on price change from previous day',
265272
'Validator' : lambda value: isinstance(value,bool) },
@@ -294,6 +301,8 @@ def make_marketcolors(**kwargs):
294301
if ohlc == "inherit" then use up/down colors.
295302
volume = color of volume bars when all the same color;
296303
if volume == "inherit" then use up/down colors.
304+
vcedge = color of volume bars edge when all the same color;
305+
if volume == "inherit" then use up/down colors.
297306
'''
298307

299308
config = _process_kwargs(kwargs, _valid_make_marketcolors_kwargs())
@@ -336,7 +345,7 @@ def _check_and_set_mktcolor(candle,**kwarg):
336345

337346
candle = marketcolors['candle']
338347

339-
for kw in ['edge','volume','ohlc','wick']:
348+
for kw in ['edge','volume','ohlc','wick','vcedge']:
340349
# `inherit=True` takes precedence:
341350
if config[kw] is not None or config['inherit'] == True:
342351
if config['inherit'] == True:

0 commit comments

Comments
 (0)