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():
127
127
128
128
'returnfig' : { 'Default' : False ,
129
129
'Validator' : lambda value : isinstance (value ,bool ) },
130
+
131
+ 'return_calculated_values' : {'Default' : None ,
132
+ 'Validator' : lambda value : isinstance (value , dict ) and len (value ) == 0 },
130
133
131
134
}
132
135
@@ -299,6 +302,17 @@ def plot( data, **kwargs ):
299
302
else :
300
303
ax1 .plot (xdates , mavprices )
301
304
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
+
302
316
avg_dist_between_points = (xdates [- 1 ] - xdates [0 ]) / float (len (xdates ))
303
317
minx = xdates [0 ] - avg_dist_between_points
304
318
maxx = xdates [- 1 ] + avg_dist_between_points
You can’t perform that action at this time.
0 commit comments