0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AI FX Botで稼働時間を絞る設計メモ

0
Posted at

はじめに

FX自動売買は24時間ずっと動かす前提で設計されがちですが、実運用では参加しない時間を先に決めるほうが安定する場合があります。

この記事では、AI FX Botの稼働時間を 0:0X 2:0X 4:0X に限定する設計を整理します。

背景

  • ノイズの多い時間帯まで監視対象に含めるとエントリー候補が増えすぎる
  • AIの判断対象が広すぎると検証軸がぶれやすい
  • 裁量介入の余地が残ると運用ログの比較が難しくなる

方針

売買シグナルの前段に時間フィルタを置きます。

  • 実行するのは 0:0X
  • 実行するのは 2:0X
  • 実行するのは 4:0X
  • それ以外は完全にスキップ

つまり「条件が良ければ入る」より前に、「そもそも参加する時間か」を判定します。

実装イメージ

def should_run(now_hour: int, now_minute: int) -> bool:
    target_hours = {0, 2, 4}
    return now_hour in target_hours and str(now_minute).zfill(2).startswith('0')

def execute_cycle(now_hour: int, now_minute: int) -> None:
    if not should_run(now_hour, now_minute):
        return

    # 相場データ取得 -> AI判定 -> 注文判定

期待している効果

  • ノイズの多い時間帯を先に除外できる
  • AIの判断母集団を絞れる
  • 人間の感情による途中介入を減らせる
  • ログ比較と改善サイクルを回しやすい

まとめ

稼働時間の制限は単なる時短ではなく、Botの意思決定空間を絞るための設計です。
「いつ参加しないか」を先に固定すると、AI FX Botは常時監視型より細く強くできます。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?