visualise_single_pair_positions_with_duration_and_slippage(state, candles, start_at=None, end_at=None, height=800, axes=True, title=True, theme='plotly_white')[source]#

Visualise performance of a live trading strategy.

Unlike visualise_single_pair() attempt to visualise

  • position duration, as a colored area

  • more position tooltip text

  • trade duration (started at - executed)

  • slippage

  • state (State) – The recorded state of the strategy execution. Either live or backtest.

  • candle_universe – Price candles we used for the strategy

  • height – Chart height in pixels

  • start_at (Optional[Union[Timestamp, datetime]]) – When the backtest started or when we crop the content

  • end_at (Optional[Union[Timestamp, datetime]]) – When the backtest ended or when we crop the content

  • axes – Draw axes labels

  • title (Union[bool, str]) –

    Draw the chart title.

    Set to string to give your own name.

    Set True to use the state name as a title. TODO: True is a legacy option and will be removed.

  • theme – Plotly colour scheme to use

  • candles (DataFrame) –

Return type