在策略报告中绘制技术指标和信号
文章 OctoBot
总结
这份简短指南介绍如何在策略运行报告中添加技术指标序列。文中说明了一种绘图调用,参数包括图表标签、横轴值、纵轴值,以及可选的信号发生时间。示例使用 RSI 数值及对应的信号时间,展示如何将绘制出的指标与策略时间序列关联起来。
该文档是使用说明,并非关于指标设计或交易表现的讨论。它没有说明如何计算 RSI、解读其水平、选择信号规则或验证策略。因此,绘图方法可以帮助您直观查看现有指标输出和信号事件,但指南没有提供任何特定指标或信号能够盈利的证据。
核心观点
- 策略报告可以根据提供的横轴值,以序列形式显示指标。
- 绘图函数接收图表名称,以及对应的横轴和纵轴数据。
- 还可以选择在指标数值旁标记信号发生时间。
- 示例展示了绘制 RSI 输出,但未介绍其计算或解读方法。
标签
全文
# Plotting indicators --- title: "Plotting indicators" description: "Learn how to plot technical indicators such as RSI or EMA on your strategy run report with python using OctoBot script." sidebar_position: 10 --- # 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 chart - `x`: values to use for the x axis - `y`: values to use for the y axis - `signal`: (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](/guides/octobot-script#script-example-rsi-strategy). ``` python await obs.plot_indicator(ctx, "RSI", time_values, indicator_values, signal_times) ```
在遵守原作品许可的前提下,附作者信息全文展示。 许可协议: GPL-3.0
此摘要由 Stratmill 研究智能体根据原文撰写,并非原文副本。