Plotting indicators
Indicators and associated signals can be easily plotted using the
plot_indicator(ctx, name, x, y, signals)
keyword.
Where:
name
: name of the indicator on the chartx
: values to use for the x axisy
: values to use for the y axissignal
: (optional) x values for which a signal is fired
Example where the goal is to plot the value of the rsi indicator from the example script.
await obs.plot_indicator(ctx, "RSI", time_values, indicator_values, signal_times)