Skip to content

Commit 14b0619

Browse files
add style ibd and work on hollow/filled tutorial
1 parent 93a8b7e commit 14b0619

File tree

3 files changed

+241
-42
lines changed

3 files changed

+241
-42
lines changed

examples/hollow_and_filled_candles.ipynb

Lines changed: 204 additions & 42 deletions
Large diffs are not rendered by default.

src/mplfinance/_styledata/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from mplfinance._styledata import checkers
1616
from mplfinance._styledata import binance
1717
from mplfinance._styledata import kenan
18+
from mplfinance._styledata import ibd
1819

1920
_style_names = [n for n in dir() if not n.startswith('_')]
2021

src/mplfinance/_styledata/ibd.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
style = dict(style_name = 'ibd',
2+
base_mpl_style= 'fast',
3+
marketcolors = {'candle' : {'up':'#2A3FE5', 'down':'#DB39AD'},
4+
'edge' : {'up':'#2A3FE5', 'down':'#DB39AD'},
5+
'wick' : {'up':'#2A3FE5', 'down':'#DB39AD'},
6+
'ohlc' : {'up':'#2A3FE5', 'down':'#DB39AD'},
7+
'volume' : {'up':'#2A3FE5', 'down':'#DB39AD'},
8+
'vcedge' : {'up':'#2A3FE5', 'down':'#DB39AD'},
9+
'vcdopcod': True, # Volume Color is Per Price Change On Day
10+
'alpha' : 1.0,
11+
},
12+
mavcolors = ['green','red','black','blue'],
13+
y_on_right = True,
14+
gridcolor = None,
15+
gridstyle = None,
16+
facecolor = None,
17+
rc = [ ('axes.titlesize', 8),
18+
('axes.labelsize', 8) ,
19+
('lines.linewidth', 3),
20+
('lines.markersize', 4),
21+
('ytick.left', False),
22+
('ytick.right', True),
23+
('ytick.labelleft', False),
24+
('ytick.labelright', True),
25+
('xtick.labelsize', 6),
26+
('ytick.labelsize', 7),
27+
('axes.linewidth', 0.8),
28+
('grid.alpha', 0.2),
29+
('axes.grid' , True ),
30+
('axes.grid.axis' , 'y' ),
31+
('grid.color' , '#b0b0b0' ),
32+
('grid.linestyle' , 'solid' ),
33+
('grid.linewidth' , 0.8 ),
34+
],
35+
base_mpf_style= 'ibd'
36+
)

0 commit comments

Comments
 (0)