Plotting

Plotting.balloonsMethod

Plots all trades for a single asset instance.

balloons(
    s::Strategies.Strategy,
    ai::Instances.AssetInstance;
    tf,
    force
) -> Makie.Figure

This function plots all trades for a single asset instance, aggregating data to the provided timeframe. It generates OHLCV data for trades, checks the size of the dataframe, prepares the figure for trade plotting, and creates triangles for IncreaseTrade and ReduceTrade. The function returns the figure.

Plotting.balloonsMethod

Plots all trades for all strategy assets.

balloons(
    s::Strategies.Strategy;
    benchmark,
    tf,
    force
) -> Makie.Figure

This function plots all trades for all strategy assets, aggregating data to the provided timeframe. The benchmark parameter determines the data over which to plot trades. The function returns the figure.

Plotting.channel_indicator!Method

Adds channel indicators to a given figure.

channel_indicator!(fig::Makie.Figure, lines...; df, opacity)

The function channel_indicator! takes a Figure object and one or more line data arrays as arguments. It first checks if the size of each line matches the number of candles in the figure. Then, it creates a new axis in the figure and links it with the price axis. For each pair of lines, it generates a random color and adds a band plot to the axis with a tooltip showing the values of the upper and lower bounds at each point. The opacity of the band can be adjusted with the opacity keyword argument.

Plotting.channel_indicatorMethod

Adds channel indicators to a given figure.

channel_indicator(
    df::DataFrames.AbstractDataFrame,
    lines...;
    opacity
) -> Makie.Figure

The function channel_indicator! takes a Figure object and one or more line data arrays as arguments. It first checks if the size of each line matches the number of candles in the figure. Then, it creates a new axis in the figure and links it with the price axis. For each pair of lines, it generates a random color and adds a band plot to the axis with a tooltip showing the values of the upper and lower bounds at each point. The opacity of the band can be adjusted with the opacity keyword argument.

Plotting.line_indicator!Method

Adds line indicators to a given figure.

line_indicator!(fig::Makie.Figure, lines...; df)

The function line_indicator! takes a Figure object and one or more line data arrays as arguments. It first checks if the size of each line matches the number of candles in the figure. Then, it creates a new axis in the figure and links it with the price axis. For each line, it generates a random color and adds a line plot to the axis with a tooltip showing the value of the line at each point.

Plotting.line_indicatorMethod

Creates a figure with line indicators from a DataFrame.

line_indicator(
    df::DataFrames.AbstractDataFrame,
    lines...
) -> Makie.Figure

The function line_indicator takes an AbstractDataFrame and one or more line data arrays as arguments. It first creates a figure using the ohlcv function with the DataFrame. Then, it calls the line_indicator! function to add line indicators to the figure. The function returns the figure with the added line indicators.

Plotting.ohlcvFunction

Plots ohlcv data from dataframe df, resampling to tf

ohlcv(df::DataFrames.AbstractDataFrame; ...) -> Makie.Figure
ohlcv(
    df::DataFrames.AbstractDataFrame,
    tf;
    kwargs...
) -> Makie.Figure

The function takes a dataframe df and a time frame tf as parameters. If tf is not nothing, the dataframe is resampled according to the time frame.

Plotting.ohlcv!Function

Plots ohlcv data from dataframe df, resampling to tf on an existing figure

ohlcv!(
    fig::Makie.Figure,
    df::DataFrames.AbstractDataFrame
) -> Makie.Figure
ohlcv!(
    fig::Makie.Figure,
    df::DataFrames.AbstractDataFrame,
    tf
) -> Makie.Figure

The function takes a figure fig, a dataframe df, and a time frame tf as parameters. If tf is not nothing, the dataframe is resampled according to the time frame. The function then plots the ohlcv data on the provided figure.

Plotting.tradesticksFunction

Plots a subset of trades history of an asset instance.

tradesticks(s::Strategies.Strategy; ...) -> Makie.Figure
tradesticks(
    s::Strategies.Strategy,
    fig::Makie.Figure,
    args...;
    kwargs...
) -> Makie.Figure

This function plots a subset of trades history of an asset instance. It takes a Strategy and an AssetInstance as parameters and optionally a Figure and additional arguments. It returns the result of the base tradesticks! function.

Plotting.tradesticks!Function

Plots trades on a figure for a given asset instance.

tradesticks!(
    fig::Makie.Figure,
    ai::Instances.AssetInstance;
    ...
) -> Makie.Figure
tradesticks!(
    fig::Makie.Figure,
    ai::Instances.AssetInstance,
    tf;
    from,
    to,
    force
) -> Makie.Figure

This function plots trades on a figure for a given asset instance. It generates OHLCV data for trades, checks the size of the dataframe, prepares the figure for trade plotting, and creates triangles for IncreaseTrade and ReduceTrade. The function returns the figure.