0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

自然言語からPine Scriptを生成してTradingViewで動かしてみる

0
Last updated at Posted at 2026-09-16

TradingViewで新しいトレード戦略を思いついたとき、意外と時間がかかるのがPine Scriptへの実装です。

今回は、自然言語で書いた戦略ルールからPine Scriptを生成する方法を試してみます。

例えば、次のような条件です。

EMA20がEMA50を上抜けたらロング
RSIが60未満の場合のみエントリー
ATRを利用してストップロスを設定

通常であれば、この条件を一つずつPine Scriptに実装します。

AIを利用すると、

Trading Strategy

Natural Language

AI

Pine Script

TradingView

Backtest

という流れで、最初のコードを作ることができます。

今回使用したのはこちらです。

重要なのは、生成されたコードをそのまま利用しないことです。

特に、

エントリー条件
strategy.entry() / strategy.exit()
repaintの有無
commission / slippage
stop loss
backtest期間

などは自分で確認する必要があります。

AIのメリットは「良い戦略を自動的に作ること」ではなく、戦略アイデアを検証可能なコードにするまでの時間を短縮することだと思います。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?