MCPcopy Index your code
hub / github.com/kernc/backtesting.py / _plot_volume_section

Function _plot_volume_section

backtesting/_plotting.py:455–465  ·  view source on GitHub ↗

Volume section

()

Source from the content-addressed store, hash-verified

453 return fig
454
455 def _plot_volume_section():
456 """Volume section"""
457 fig = new_indicator_figure(height=70, y_axis_label="Volume")
458 fig.yaxis.ticker.desired_num_ticks = 3
459 fig.xaxis.formatter = fig_ohlc.xaxis[0].formatter
460 fig.xaxis.visible = True
461 fig_ohlc.xaxis.visible = False # Show only Volume's xaxis
462 r = fig.vbar('index', BAR_WIDTH, 'Volume', source=source, color=inc_cmap)
463 set_tooltips(fig, [('Volume', '@Volume{0.00 a}')], renderers=[r])
464 fig.yaxis.formatter = NumeralTickFormatter(format="0 a")
465 return fig
466
467 def _plot_superimposed_ohlc():
468 """Superimposed, downsampled vbars"""

Callers 1

plotFunction · 0.85

Calls 2

new_indicator_figureFunction · 0.85
set_tooltipsFunction · 0.85

Tested by

no test coverage detected