@@ -61,60 +61,61 @@ def _apply_mpfstyle(style):
61
61
def _valid_make_mpf_style_kwargs ():
62
62
vkwargs = {
63
63
'base_mpf_style' : { 'Default' : None ,
64
- 'Description' : '' ,
64
+ 'Description' : 'mplfinance style to use as base of new mplfinance style ' ,
65
65
'Validator' : lambda value : value in _styles .keys () },
66
66
67
67
'base_mpl_style' : { 'Default' : None ,
68
- 'Description' : '' ,
68
+ 'Description' : 'matplotlib style to use as base of new mplfinance style ' ,
69
69
'Validator' : lambda value : isinstance (value ,str ) }, # and is in plt.style.available
70
70
71
71
'marketcolors' : { 'Default' : None ,
72
- 'Description' : '' ,
72
+ 'Description' : 'market colors object, from `mpf.make_market_colors()` ' ,
73
73
'Validator' : lambda value : isinstance (value ,dict ) },
74
74
75
75
'mavcolors' : { 'Default' : None ,
76
- 'Description' : '' ,
76
+ 'Description' : 'sequence of colors to use for moving averages ' ,
77
77
'Validator' : lambda value : isinstance (value ,list ) }, # TODO: all([_mpf_is_color_like(v) for v in value.values()])
78
78
79
79
80
80
'facecolor' : { 'Default' : None ,
81
- 'Description' : '' ,
81
+ 'Description' : 'background color for Axes ' ,
82
82
'Validator' : lambda value : isinstance (value ,str ) },
83
83
84
84
'edgecolor' : { 'Default' : None ,
85
- 'Description' : '' ,
85
+ 'Description' : 'edge color for Axes ' ,
86
86
'Validator' : lambda value : isinstance (value ,str ) },
87
87
88
88
'figcolor' : { 'Default' : None ,
89
- 'Description' : '' ,
89
+ 'Description' : 'background color for Figure. ' ,
90
90
'Validator' : lambda value : isinstance (value ,str ) },
91
91
92
92
'gridcolor' : { 'Default' : None ,
93
- 'Description' : '' ,
93
+ 'Description' : 'color for grid lines ' ,
94
94
'Validator' : lambda value : isinstance (value ,str ) },
95
95
96
96
'gridstyle' : { 'Default' : None ,
97
- 'Description' : '' ,
97
+ 'Description' : "grid line style ('-', '--', '-.', ':', '', offset, on-off-seq)." +
98
+ " (see also: https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html)" ,
98
99
'Validator' : lambda value : isinstance (value ,str ) },
99
100
100
101
'gridaxis' : { 'Default' : None ,
101
- 'Description' : '' ,
102
+ 'Description' : "grid lines 'vertical', 'horizontal', or 'both'" ,
102
103
'Validator' : lambda value : value in [ 'vertical' [0 :len (value )], 'horizontal' [0 :len (value )], 'both' [0 :len (value )] ] },
103
104
104
105
'y_on_right' : { 'Default' : None ,
105
- 'Description' : '' ,
106
+ 'Description' : 'True|False primary Axes y-ticks and labels on right. ' ,
106
107
'Validator' : lambda value : isinstance (value ,bool ) },
107
108
108
109
'rc' : { 'Default' : None ,
109
- 'Description' : '' ,
110
+ 'Description' : 'rcparams overrides (dict) (all other rcparams unchanged) ' ,
110
111
'Validator' : lambda value : isinstance (value ,dict ) },
111
112
112
113
'legacy_rc' : { 'Default' : None , # Just in case someone depended upon old behavior
113
- 'Description' : '' ,
114
+ 'Description' : 'rcparams to set (dict) (all other rcparams cleared) ' ,
114
115
'Validator' : lambda value : isinstance (value ,dict ) },
115
116
116
117
'style_name' : { 'Default' : None ,
117
- 'Description' : '' ,
118
+ 'Description' : 'name for this style; useful when calling `mpf.write_style_file(style,filename)` ' ,
118
119
'Validator' : lambda value : isinstance (value ,str ) },
119
120
120
121
}
@@ -209,55 +210,60 @@ def _valid_mpf_style(value):
209
210
def _valid_make_marketcolors_kwargs ():
210
211
vkwargs = {
211
212
'up' : { 'Default' : None ,
212
- 'Description' : '' ,
213
+ 'Description' : 'color to indicate up' ,
213
214
'Validator' : lambda value : _mpf_is_color_like (value ) },
214
215
215
216
'down' : { 'Default' : None ,
216
- 'Description' : '' ,
217
+ 'Description' : 'color to indicate down' ,
217
218
'Validator' : lambda value : _mpf_is_color_like (value ) },
218
219
219
220
'hollow' : { 'Default' : None ,
220
- 'Description' : '' ,
221
+ 'Description' : "color for hollow candles (for `type=hollow`)" ,
221
222
'Validator' : lambda value : _mpf_is_color_like (value ) },
222
223
223
224
'alpha' : { 'Default' : None ,
224
- 'Description' : '' ,
225
+ 'Description' : 'opacity 0.0 (transparent) to 1.0 (opaque);' +
226
+ ' applies to candles,renko,pnf (but not ohlc bars)' ,
225
227
'Validator' : lambda value : (isinstance (value ,float )
226
228
and 0.0 <= value and 1.0 >= value ) },
227
229
228
230
'edge' : { 'Default' : None ,
229
- 'Description' : '' ,
231
+ 'Description' : 'color of candle edge; may also be "i" or "inherit"' +
232
+ ' to take color from base_mpf_style' ,
230
233
'Validator' : lambda value : _valid_mpf_color_spec (value ) },
231
234
232
235
'wick' : { 'Default' : None ,
233
- 'Description' : '' ,
236
+ 'Description' : "color of candle wick; may be single color," +
237
+ " or may be dict with keys 'up' and 'down'" ,
234
238
'Validator' : lambda value : isinstance (value ,dict )
235
239
or isinstance (value ,str )
236
240
or _mpf_is_color_like (value ) },
237
241
238
242
'ohlc' : { 'Default' : None ,
239
- 'Description' : '' ,
243
+ 'Description' : "color of ohlc bars; may be single color," +
244
+ " or may be dict with keys 'up' and 'down'" ,
240
245
'Validator' : lambda value : isinstance (value ,dict )
241
246
or isinstance (value ,str )
242
247
or _mpf_is_color_like (value ) },
243
248
244
249
'volume' : { 'Default' : None ,
245
- 'Description' : '' ,
250
+ 'Description' : "color of volume bars; may be single color," +
251
+ " or may be dict with keys 'up' and 'down'" ,
246
252
'Validator' : lambda value : isinstance (value ,dict )
247
253
or isinstance (value ,str )
248
254
or _mpf_is_color_like (value ) },
249
255
250
256
'vcdopcod' : { 'Default' : False ,
251
- 'Description' : '' ,
257
+ 'Description' : 'True/False volume color depends on price change from previous day ' ,
252
258
'Validator' : lambda value : isinstance (value ,bool ) },
253
259
254
260
255
261
'inherit' : { 'Default' : False ,
256
- 'Description' : '' ,
262
+ 'Description' : 'inherit color from base_mpf_style for: edge,volume,ohlc,wick ' ,
257
263
'Validator' : lambda value : isinstance (value ,bool ) },
258
264
259
265
'base_mpf_style' : { 'Default' : None ,
260
- 'Description' : '' ,
266
+ 'Description' : 'mplfinance style market colors as basis for new market colors object ' ,
261
267
'Validator' : lambda value : isinstance (value ,str ) },
262
268
}
263
269
0 commit comments