ChartBacktestRenderingSetup#

API documentation for tradeexecutor.strategy.chart.renderer.ChartBacktestRenderingSetup Python class in Trading Strategy framework.

class ChartBacktestRenderingSetup[source]#

Bases: object

Define a setup that tells which pairs we are about to render

__init__(registry, strategy_input_indicators, state=None, backtest_end_at=None, pairs=None)#
Parameters:
Return type:

None

Methods

__init__(registry, strategy_input_indicators)

render(func, **kwargs)

Render the chart using the provided function.

Attributes

registry

strategy_input_indicators

state

Backtesting or live trading state

backtest_end_at

Backtest end time hint, if backtest is not run yet.

pairs

Selected pairs.

execution_context

state: tradeexecutor.state.state.State | None#

Backtesting or live trading state

backtest_end_at: datetime.datetime | None#

Backtest end time hint, if backtest is not run yet. Backtest end time hint, if backtest is not run yet.

pairs: Optional[Collection[TradingPairIdentifier]]#

Selected pairs.

Examine these assets in backtesting rendering functions. If not given pick ChartRegistry.default_pairs.

render(func, **kwargs)[source]#

Render the chart using the provided function.

Parameters:
  • func (Callable) – Python function object registered with ChartRegistry.register().

  • kwargs – Extra arguments passed to the function

Return type:

plotly.graph_objs._figure.Figure | pandas.core.frame.DataFrame | tuple[plotly.graph_objs._figure.Figure, pandas.core.frame.DataFrame] | list[plotly.graph_objs._figure.Figure] | matplotlib.figure.Figure | pandas.io.formats.style.Styler | IPython.core.display.HTML

__init__(registry, strategy_input_indicators, state=None, backtest_end_at=None, pairs=None)#
Parameters:
Return type:

None