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

Function _plot_ohlc

backtesting/_plotting.py:510–516  ·  view source on GitHub ↗

Main OHLC bars

()

Source from the content-addressed store, hash-verified

508 fill_color=factor_cmap('inc', colors_lighter, ['0', '1']))
509
510 def _plot_ohlc():
511 """Main OHLC bars"""
512 fig_ohlc.segment('index', 'High', 'index', 'Low', source=source, color="black",
513 legend_label='OHLC')
514 r = fig_ohlc.vbar('index', BAR_WIDTH, 'Open', 'Close', source=source,
515 line_color="black", fill_color=inc_cmap, legend_label='OHLC')
516 return r
517
518 def _plot_ohlc_trades():
519 """Trade entry / exit markers on OHLC plot"""

Callers 1

plotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected