Plotting Indicators and Data in Strategy Run Reports
Summary
This OctoBot Script documentation page explains how to add charts to a strategy execution report through a plotting function. It describes naming a plotted indicator and supplying optional data for axes, labels, display mode, chart placement, color, and a separate vertical axis. It also lists fields for candlestick charts, including open, high, low, close, and volume values.
The example shows an RSI series displayed as markers, illustrating how an indicator can be visualized against supplied time values. The page is a concise API guide rather than a trading strategy or empirical study: it provides no backtest results, chart interpretation advice, or discussion of how visualization choices affect analysis. Its practical scope is limited to configuring report plots using the documented arguments.
Key ideas
- Strategy reports can display custom data through a plotting function.
- Plot configuration can include axis values, labels, display mode, color, and chart placement.
- Candlestick plots can use open, high, low, close, and volume data.
- An independent vertical axis can be assigned to a plot when needed.
Tags
Full text
# Tout tracer
---
title: "Tout tracer"
description: "Apprenez comment représenter graphiquement n'importe quel type de données dans votre rapport d'exécution de stratégie en utilisant Python à l'aide d'OctoBot Script."
sidebar_position: 11
---
# Tout tracer
:::info
La traduction française de cette page est en cours.
:::
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.