Skip to content
All library documents

Plotting Strategy Data in OctoBot Run Reports

Article OctoBot

Summary

This brief OctoBot reference explains how to add custom data series to a strategy run report with the plotting function. The chart arguments are passed through as Plotly parameters, allowing a strategy author to label a series and provide values for its axes, point annotations, display mode, chart placement, color, and independent y-axis settings. It also describes inputs for rendering candlestick data, including open, high, low, close, and volume.

The example plots an RSI series as markers against time values, illustrating how an indicator can be shown in a report. The method is for visualization and inspection; the document does not describe a trading rule, a backtest, or evidence that plotted indicators improve decisions. It also gives no guidance on data alignment, missing values, or chart interpretation, so users must ensure that supplied series correspond correctly to the strategy's timestamps and intended scale.

Key ideas

  • The plotting function adds custom series to an OctoBot strategy run report.
  • Its arguments map to chart properties such as axes, labels, display mode, chart location, and color.
  • Candlestick plotting can use open, high, low, close, and volume data.
  • A sample demonstrates displaying RSI values as markers against time.
  • The reference explains visualization inputs but provides no trading evaluation or performance evidence.

Tags

Full text
# Plotting anything


---
title: "Plotting anything"
description: "Learn how to plot any type of data on your strategy run report with python using OctoBot script."
sidebar_position: 11
---



# Plotting anything

Anything can be plotted on your strategy run report using the `plot(ctx, name, ...)` keyword.
The plot arguments are converted into <a href="https://plotly.com/javascript/" rel="nofollow">plotly</a> charts parameters.

Where:

- `name`: name of the indicator on the chart

Optional arguments:

- `x`: values to use for the x axis
- `y`: values to use for the y axis
- `z`: values to use for the z axis
- `text`: point labels
- `mode`: plotly mode ("lines", "markers", "lines+markers", "lines+markers+text", "none")
- `chart`: "main-chart" or "sub-chart" (default is "sub-chart")
- `own_yaxis`: when True, uses an independent y axis for this plot (default is False)
- `color`: color the of plot
- `open`: open values for a candlestick chart
- `high`: high values for a candlestick chart
- `low`: low values for a candlestick chart
- `close`: close values for a candlestick chart
- `volume`: volume values for a candlestick chart
- `low`: low values for a candlestick chart

Example:

```python
await obs.plot(ctx, "RSI", x=time_values, y=indicator_values, mode="markers")
```

Shown in full with attribution under the source's licence. Licence: GPL-3.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.