PlotLabel#

API documentation for tradeexecutor.state.visualisation.PlotLabel Python class in Trading Strategy framework.

class PlotLabel[source]#

Bases: Enum

How do we render the plot label.

See Visualisation.plot_indicator().

Example:

# Draw BTC + ETH RSI between its trigger zones for this pair of we got a valid value for RSI for this pair

# BTC RSI daily
visualisation.plot_indicator(
    timestamp,
    f"RSI",
    PlotKind.technical_indicator_detached,
    current_rsi_values[btc_pair],
    colour="orange",
)

# ETH RSI daily
visualisation.plot_indicator(
    timestamp,
    f"RSI ETH",
    PlotKind.technical_indicator_overlay_on_detached,
    current_rsi_values[eth_pair],
    colour="blue",
    label=PlotLabel.hidden,
    detached_overlay_name=f"RSI",
)

# Low (vertical line)
visualisation.plot_indicator(
    timestamp,
    f"RSI low trigger",
    PlotKind.technical_indicator_overlay_on_detached,
    rsi_low,
    detached_overlay_name=f"RSI",
    plot_shape=PlotShape.horizontal_vertical,
    colour="red",
    label=PlotLabel.hidden,
)

# High (vertical line)
visualisation.plot_indicator(
    timestamp,
    f"RSI high trigger",
    PlotKind.technical_indicator_overlay_on_detached,
    rsi_high,
    detached_overlay_name=f"RSI",
    plot_shape=PlotShape.horizontal_vertical,
    colour="red",
    label=PlotLabel.hidden,
)
__init__(*args, **kwds)#

Attributes

axis

Render the plot label as the axis description left or right.

hidden

This plot label is hidden on the axis.

axis = 'axis'#

Render the plot label as the axis description left or right.

hidden = 'hidden'#

This plot label is hidden on the axis.

Plot names etc. will still appear in mouse hovers.