Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/mplfinance/_styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ def _valid_make_marketcolors_kwargs():
or isinstance(value,str)
or _mpf_is_color_like(value) },

'vcedge' : { 'Default' : None,
'Description' : "color of volume bars edge; may be single color,"+
" or may be dict with keys 'up' and 'down'",
'Validator' : lambda value: isinstance(value,dict)
or isinstance(value,str)
or _mpf_is_color_like(value) },

'vcdopcod' : { 'Default' : False,
'Description' : 'True/False volume color depends on price change from previous day',
'Validator' : lambda value: isinstance(value,bool) },
Expand Down Expand Up @@ -294,6 +301,8 @@ def make_marketcolors(**kwargs):
if ohlc == "inherit" then use up/down colors.
volume = color of volume bars when all the same color;
if volume == "inherit" then use up/down colors.
vcedge = color of volume bars edge when all the same color;
if volume == "inherit" then use up/down colors.
'''

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

candle = marketcolors['candle']

for kw in ['edge','volume','ohlc','wick']:
for kw in ['edge','volume','ohlc','wick','vcedge']:
# `inherit=True` takes precedence:
if config[kw] is not None or config['inherit'] == True:
if config['inherit'] == True:
Expand Down