File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ def _valid_plot_kwargs():
127127
128128 'returnfig' : { 'Default' : False ,
129129 'Validator' : lambda value : isinstance (value ,bool ) },
130+
131+ 'return_calculated_values' : {'Default' : None ,
132+ 'Validator' : lambda value : isinstance (value , dict ) and len (value ) == 0 },
130133
131134 }
132135
@@ -299,6 +302,17 @@ def plot( data, **kwargs ):
299302 else :
300303 ax1 .plot (xdates , mavprices )
301304
305+ if config ['return_calculated_values' ] is not None :
306+ retdict = config ['return_calculated_values' ]
307+ if ptype == 'renko' :
308+ retdict ['renko_bricks' ] = brick_values
309+ retdict ['renko_dates' ] = mdates .num2date (new_dates )
310+ if config ['volume' ]:
311+ retdict ['renko_volumes' ] = volumes
312+ if mavgs is not None :
313+ for i in range (0 , len (mavgs )):
314+ retdict ['mav' + str (mavgs [i ])] = mavprices
315+
302316 avg_dist_between_points = (xdates [- 1 ] - xdates [0 ]) / float (len (xdates ))
303317 minx = xdates [0 ] - avg_dist_between_points
304318 maxx = xdates [- 1 ] + avg_dist_between_points
You can’t perform that action at this time.
0 commit comments