utils#

API documentation for tradeexecutor.visual.utils Python module in Trading Strategy.

Module description#

Functions#

export_trade_for_dataframe(p, t)

Export data for a Pandas dataframe presentation.

export_trades_as_dataframe(portfolio, pair_id)

Convert executed trades to a dataframe, so it is easier to work with them in Plotly.

get_all_positions(state, pair_id)

Get all positions for a given pair

get_all_text(state_name, axes, title, ...)

get_num_detached_and_names(...)

get_pair_base_quote_names(state, pair_id)

Get all positions for the trading pair we want to visualise

get_pair_name_from_first_trade(first_trade)

get_start_and_end(start_at, end_at)

Get and validate start and end timestamps

get_subplot_names(pair_name, ...[, plots, ...])

Get subplot names for detached technical indicators.

visualise_trades(fig, candles, trades_df[, ...])

Plot individual trades over the candlestick chart.