Skip to content

Commit fd9f4e4

Browse files
replace hollow.py with kenan.py
replace `hollow.py` with `kenan.py` ...
1 parent bda054b commit fd9f4e4

File tree

4 files changed

+39
-37
lines changed

4 files changed

+39
-37
lines changed

examples/hollow_candles.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
"\n",
4444
"### Later we will make this a tutorial explaining what hollow candles are and how to use them.\n",
4545
"\n",
46-
"#### There is also currently some code in here prototyping a function to dump a style made with `mpf.make_mpf_style()` into a file that can then be installed into `mplfinance/src/mplfinance/_style_data/` and used as one of mplfinance's built-in styles.\n",
46+
"---\n",
47+
"\n",
48+
"### There is also some code below<br> prototyping a function<br>to dump a style made with &nbsp; `mpf.make_mpf_style()`<br><br> into a file that can then be installed into &nbsp; `mplfinance/src/mplfinance/_style_data/`<br><br> and used as one of mplfinance's built-in styles.\n",
4749
"\n",
4850
"---\n",
4951
"---\n",
@@ -345,7 +347,7 @@
345347
" 'checkers',\n",
346348
" 'classic',\n",
347349
" 'default',\n",
348-
" 'hollow',\n",
350+
" 'kenan',\n",
349351
" 'mike',\n",
350352
" 'nightclouds',\n",
351353
" 'sas',\n",
@@ -390,7 +392,7 @@
390392
],
391393
"source": [
392394
"mpf.plot(tdf.loc['09-10-2011':'10-20-2011'],type='hollow_candle',volume=True,style='checkers',tight_layout=True,figscale=0.75)\n",
393-
"mpf.plot(tdf.loc['09-10-2011':'10-20-2011'],type='hollow_candle',volume=True,style='hollow',tight_layout=True,figscale=0.75)"
395+
"mpf.plot(tdf.loc['09-10-2011':'10-20-2011'],type='hollow_candle',volume=True,style='kenan',tight_layout=True,figscale=0.75)"
394396
]
395397
},
396398
{
@@ -645,7 +647,7 @@
645647
" 'checkers',\n",
646648
" 'classic',\n",
647649
" 'default',\n",
648-
" 'hollow',\n",
650+
" 'kenan',\n",
649651
" 'mike',\n",
650652
" 'nightclouds',\n",
651653
" 'sas',\n",
@@ -701,8 +703,6 @@
701703
}
702704
],
703705
"source": [
704-
"#mpf.plot(df,type='hollow_candle',style='hollow',volume=True,figscale=0.75)#,style=s)\n",
705-
"\n",
706706
"updn = dict(up='k',down='r')\n",
707707
"#m = mpf.make_marketcolors(base_mpf_style='default',up='k',down='r',hollow='w',wick=dict(up='k',down='r'),\n",
708708
"# edge=dict(up='k',down='r'))\n",
@@ -711,7 +711,7 @@
711711
"\n",
712712
"mpf.plot(df,type='hollow_candle',volume=True,style=s,figscale=0.75)\n",
713713
"\n",
714-
"mpf.plot(df,type='candle' ,style='hollow',volume=True,figscale=0.75)\n",
714+
"mpf.plot(df,type='candle' ,style='kenan',volume=True,figscale=0.75)\n",
715715
"mpf.plot(df,type='candle' ,style=s,volume=True,figscale=0.75)\n",
716716
"\n",
717717
"import pprint\n",
@@ -994,7 +994,7 @@
994994
"source": [
995995
"#mpf.plot(tdf,type='renko',volume=True,style='blueskies')\n",
996996
"#s = mpf.make_mpf_style(base_mpf_style='default',facecolor='#b4c0d4')\n",
997-
"mpf.plot(df,type='hollow_candle',style='hollow',volume=True,figscale=0.75)#,style=s)\n",
997+
"mpf.plot(df,type='hollow_candle',style='kenan',volume=True,figscale=0.75)#,style=s)\n",
998998
"\n",
999999
"m = mpf.make_marketcolors(base_mpf_style='default',up='k',down='r',hollow='w',wick=dict(up='k',down='r'))\n",
10001000
"s = mpf.make_mpf_style(base_mpf_style='default',marketcolors=m)\n",

src/mplfinance/_styledata/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from mplfinance._styledata import yahoo
1515
from mplfinance._styledata import checkers
1616
from mplfinance._styledata import binance
17-
from mplfinance._styledata import hollow
17+
from mplfinance._styledata import kenan
1818

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

src/mplfinance/_styledata/hollow.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/mplfinance/_styledata/kenan.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
style = { 'style_name': 'kenan',
2+
'base_mpl_style': 'seaborn-darkgrid',
3+
'marketcolors': { 'candle': {'up': 'k', 'down': 'r'},
4+
'edge': {'up': 'k', 'down': 'r'},
5+
'wick': {'up': 'k', 'down': 'r'},
6+
'ohlc': {'up': 'k', 'down': 'k'},
7+
'volume': {'up': '#1f77b4', 'down': '#1f77b4'},
8+
'vcedge': {'up': '#1f77b4', 'down': '#1f77b4'},
9+
'vcdopcod': False,
10+
'alpha': 0.9,
11+
'hollow': 'w'},
12+
'mavcolors': [ '#40e0d0',
13+
'#ff00ff',
14+
'#ffd700',
15+
'#1f77b4',
16+
'#ff7f0e',
17+
'#2ca02c',
18+
'#e377c2'],
19+
'y_on_right': False,
20+
'gridcolor': None,
21+
'gridstyle': None,
22+
'facecolor': '#DCE3EF',
23+
'rc': [ ('axes.edgecolor', 'black'),
24+
('axes.linewidth', 1.5),
25+
('axes.labelsize', 'large'),
26+
('axes.labelweight', 'semibold'),
27+
('lines.linewidth', 2.0),
28+
('font.weight', 'medium'),
29+
('font.size', 12.0)],
30+
'base_mpf_style': 'default'}

0 commit comments

Comments
 (0)