TimelineStyler#

tradeexecutor.analysis.trade_analyser.TimelineStyler class.

class TimelineStyler[source]#

Bases: object

Style the expanded trades timeline table.

Give HTML hints for DataFrame how it should be rendered in the notebook output.

__init__(row_styling, hidden_columns, vmin, vmax)[source]#
Parameters

Methods

__init__(row_styling, hidden_columns, vmin, vmax)

colour_timelime_row_simple(row)

Set colour for each timeline row based on its profit.

__init__(row_styling, hidden_columns, vmin, vmax)[source]#
Parameters
colour_timelime_row_simple(row)[source]#

Set colour for each timeline row based on its profit.

Parameters

row (Series) –

Return type

Series

__call__(df)[source]#

Applies styles on a dataframe

Parameters

df (DataFrame) – Dataframe as returned by :py:func`expand_timeline`.