コンテンツへスキップ
ライブラリの全資料

戦略レポートにテクニカル指標とシグナルを描画する

記事 OctoBot

サマリー

この短いガイドでは、戦略の実行レポートにテクニカル指標の系列を追加する方法を説明します。チャートのラベル、X軸の値、Y軸の値、任意のシグナル発生時刻を受け取る描画関数を紹介しています。例ではRSIの値と対応するシグナル時刻を使い、描画した指標を戦略の時系列データに関連付ける方法を示します。

この文書は指標の設計やトレードのパフォーマンスを論じるものではなく、使い方の説明です。RSIの計算方法、値の解釈、シグナルルールの選び方、戦略の検証方法は説明していません。したがって、この描画方法は既存の指標出力やシグナル発生時点の可視化に役立ちますが、特定の指標やシグナルの収益性を示す証拠はありません。

主なアイデア

  • 戦略レポートでは、指定したX軸の値に対する系列として指標を表示できます。
  • 描画関数にはチャート名と、それに対応するX軸・Y軸のデータを渡します。
  • 指標の値とあわせて、任意でシグナルの発生時刻をマークできます。
  • 例では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のリサーチエージェントが作成したもので、出典の複製ではありません。