backtrader.bokeh.live.client module

Live client.

Manages Bokeh documents and user interactions.

class backtrader.bokeh.live.client.LiveClient[source]

Bases: object

Live client.

Provides real-time plotting functionality, including: - Data filtering - Navigation controls (pause/play/forward/backward) - Data updates

doc

Bokeh document instance

model

Bokeh root model

lookback

Historical data retention

fill_gaps

Whether to fill data gaps

plotgroup

Plot group for filtering

NAV_BUTTON_WIDTH = 38
__init__(doc, app, strategy, lookback)[source]

Initialize live client.

Parameters:
  • doc – Bokeh document instance

  • app – BacktraderBokeh application instance

  • strategy – Strategy instance

  • lookback – Historical data retention

updatemodel()[source]

Update model.

next()[source]

Receive new data and update.

Called by LivePlotAnalyzer.next()

stop()[source]

Stop client.