コンテンツにスキップ

Statistical Anomaly Reversal

EA0001_Statistical_Anomaly_Reversal_v1.0 / ⚠️ FAILED — 生成失敗・修正失敗・BT不合格

ワンライナー

Statistical Anomaly Reversal

基本情報

項目 項目
シンボル USDJPY エントリー種別 oscillator_reversal
時間足 H1 エグジット fixed_sl
方向 both 主要インジケータ RSI, SMA, ATR

🧬 DNA 4軸

primary_style entry_mechanism regime_target position_logic
meta oscillator_reversal any fixed_sl

📊 バックテスト結果

判定: ❌ FAIL / 期間: — 〜 —

PF 損益率 勝率 最大DD シャープ 取引数
0.88 -3.50% 32.8% 11.00% -1.64 724

📝 仕様書 / Specification

🇯🇵 クリックで展開(日本語版)

Research EA Spec: Statistical Anomaly Reversal

EA Identity

  • EA name: REF0430_01_Statistical_Anomaly_Reversal_v1
  • Symbol: USDJPY
  • Timeframe:
  • Primary style: meta
  • Entry mechanism: oscillator_reversal
  • Regime target: any
  • Position logic: fixed_sl

Research Thesis

Statistical Anomaly Reversal candidate generated from 1 research source(s). The strategy must preserve the source idea while keeping parameters broad enough to survive out-of-sample testing.

Source Evidence

  • [SEASONAL] [MR] 月初の週 (1-5営業日) は機関の月次リバランスでドルが買われやすい傾向
  • [RISK] [SEASONAL] スワップポイントが正/負の通貨ペアで複数日ポジション保有時はスワップを損益計算に必ず含める
  • [ANOMALY] [FILTER] G10通貨ペアの相関は実際には高く、複数通貨同時保有は想定リスクの1.5-2倍と考える
  • [SEASONAL] [CONTRA] 月曜オープンのギャップ埋め戦略は統計的に確認されているが、ギャップ方向が先週トレンドの延長の場合は失敗率が高い

Tradable Spec

  • Entry logic: BUY entry: RSI(14) on bar[1] crosses above oversold threshold from below — rsi[1] > InpOversold && rsi[2] <= InpOversold (input default InpOversold=40). SELL entry: RSI crosses below overbought — rsi[1] < InpOverbought && rsi[2] >= InpOverbought (default=60). Regime filter: define using a separate 50-bar SMA — bullishRegime = (close[1] > sma50[1]). Do NOT use RSI thresholds to define regime, as that reuses the same indicator as the entry signal. ONE regime variable only: use ONLY bullishRegime in the entry AND condition — do NOT also add regimeUp or any slope check.
  • Exit logic: Primary exit: regime signal reverses (opposite regime state detected on confirmed bar[1]). RSI sub-exit: if entry used RSI oversold signal, exit when RSI[1] returns above 50 (longs) or below 50 (shorts). Hard stop: ATR(14)*1.5 beyond entry, fixed. Time exit: max hold InpMaxBars bars (default=24) — meta strategies degrade when held positionally. Partial close option: 50% at 0.75R, hold remainder for regime exit.
  • Risk management: Fixed fractional risk per trade, no martingale, no grid expansion, max one position per symbol, and hard daily loss guard.

Filters

  • Spread and session filter
  • Minimum ATR activity filter
  • Regime-specific confirmation filter from source evidence
  • Contrarian safety filter: disable after consecutive false signals

Logic Independence Requirements

必須チェック(実装前に確認すること):

  • エントリーシグナル変数とレジームフィルター変数は独立したデータ源または独立したlookbackから計算すること
  • 悪い例: bullishCross = fastMA[1] > slowMA[1]isBearishRegime = fastMA[1] < slowMA[1] を AND 結合 → 同一バーで両立不可、取引ゼロになる
  • 正しいレジーム定義: slowMA[1] - slowMA[10] の傾き、上位足のMA方向、長い lookback(50本以上)の傾き
  • 全フィルターを AND 結合した時に、理論上発火できるバーが存在することをスケッチで確認すること
  • 逆張り戦略では「エントリー条件の否定 ≠ レジーム条件」になっているか必ず確認すること
  • RSI・BB・ATR など同一インジケーターを「シグナル源」と「フィルター源」の両方に使う場合、同じバーで矛盾する不等式を要求していないか確認すること
  • レジーム変数は1本のみ: bullishRegime (または uptrend 等) という bool 変数を1つ定義し、エントリー条件の AND に使うのはその1変数のみにすること。bullishRegime && regimeUp のように2本のレジーム変数を AND 結合することを禁止する。スロープ・価格位置・ADX など複数軸で判断したい場合は、それらを統合した1本の bool 変数にまとめてから AND に組み込むこと。

Optimization Envelope

  • Relaxable: confirmation thresholds, ATR activity threshold, session window, signal confirmation bars.
  • Not relaxable: stop-loss discipline, max one position, no martingale, no fixed historical price levels.
  • Initial optimization scope: 3-5 parameters only.
  • If no trades: loosen entry confirmation first, then session restriction, then ATR threshold.
  • If too many trades: strengthen regime filter and minimum signal distance.

Backtest Acceptance

  • Backtest at least 6 months with the latest 3 months held out.
  • Use walk-forward setting 6:2 when MT5 runner is available.
  • Reject if OOS/IS PF ratio is below 0.70 or if OOS PF min is below 1.10.
  • Reject if OOS trade count is too low; first loosen entry filters before optimizing profit targets.

Overfitting Controls

  • Keep each numeric parameter in a wide theory-backed range; do not tune to a single date range.
  • Limit optimization to 3-5 core parameters in the first pass.
  • Prefer regime filters with clear market meaning over curve-fitted thresholds.
  • Stop improving the candidate after repeated NO_TRADE/LOW_SAMPLE failures.

Learning Feedback

  • ledger: 1 prior tick-model mismatch hit(s) for this DNA
  • ledger: 1 prior infra/incomplete run(s) for this DNA
  • ledger: improve: loosen entry confirmation or session restriction before touching exits
  • ledger: improve: rerun the same candidate after repairing backtest artifacts
  • ledger: improve: prefer theory-backed ranges and freeze nonessential parameters
  • ledger: improve: rerun with every-tick backtest before loosening entries because bar-based tests may miss tick-sensitive triggers
  • ledger: improve: widen active sessions or simplify filters to increase sample size

Implementation Guardrails

  • [META] [RISK] [CONTRA] MT5 Strategy Testerは同名EAのinput値をキャッシュすることがあり、mq5側のinputデフォルトを変更して再コンパイルしても、BTでは前回値が使われる場合がある。inputデフォルト変更の検証では、別EA名/別ファイル名にするか、tester.ini/ExpertParametersで明示的に値を渡し、Testerログの「started with inputs」を必ず確認する。 (.clinerules)
  • [RISK] [META] [CONTRA] 【部分決済後のコメント管理パターン】MQL5ではPositionModifyでコメントを変更できないため、TP1部分決済後の状態管理にコメントプレフィックスを使う設計は「二重部分決済」リスクを内包する。対策として: (1)グローバルなulong配列でTP1済みチケットを管理する、(2)部分決済後に残りを即クローズ→新コメントで再エントリーする、のいずれかのパターンを採用すること。 (.clinerules)
  • [RISK] DEAL_POSITION_IDによるトレード集計: 部分決済を含むポジションでは同一ポジション由来の複数DEALが発生する。連敗カウント等のトレード単位集計にはDEAL_COMMENTではなくDEAL_POSITION_IDを使用し、カウント済みIDを配列で管理することで重複計上を防ぐ。 (.clinerules)
  • [RISK] 【OnTradeTransactionによる決済検出パターン】ポジションクローズの検出にはOnTradeTransaction(trans.type == TRADE_TRANSACTION_DEAL_ADD && DEAL_ENTRY_OUT)を使用し、DEAL_POSITION_IDでエントリー管理配列と照合する設計が堅牢。HistorySelectによるポーリング方式より確実でリアルタイム性が高い。 (.clinerules)
  • [TREND] [BREAKOUT] [FILTER] [META] マルチタイムフレームEAでATR等のボラティリティ指標をCopyBufferする際、エントリー判定用の価格・MA(start_pos=1で確定足参照)とATR(start_pos=0で未確定バー参照)でstart_posが混在しやすい。設計方針として「全バッファのstart_posを統一する」か「ATRのみ最新値を使う理由をコメントで明記する」かを決めておくべき。 (.clinerules)
  • [FILTER] SYMBOL_SPREADはポイント単位のlong値を返すため、価格単位に変換するには* _Pointを直接使用する (.clinerules)
  • [FILTER] スキャルピングEAでXAUUSD等のスプレッド変動が大きい銘柄を扱う場合、pips単位ではなく価格単位(ドル)でスプレッド閾値・トレランスを指定する設計が適切。_Digits==2環境ではpips×_Pointが意図しない極小値になる (.clinerules)
  • [TREND] [FILTER] スプレッドリトライパターン(予約エントリーのスプレッド不良時リトライ): 予約フラグ方式でスプレッド不良時に即破棄せず、MAX_SPREAD_RETRY回まで次バーで再試行する設計。リトライカウンターは予約フラグと同時にリセットし、クールダウンや金曜制限等の他条件で予約破棄する際もリセットを忘れないこと。リトライの粒度(ティック単位 vs バー単位)を設計時に明確にすべき。 (.clinerules)

Story Package

  • Hook: AIが研究メモから自律発掘した「Statistical Anomaly Reversal」をEA化して検証。
  • Blog angle: 研究アイデアは本当にMT5で再現できるのか、OOSで崩れるかまで公開する。
  • Failure angle: 失敗時は NO_TRADE / LOW_SAMPLE / OVERFIT / HIGH_DD に分類して次の研究候補へ進む。

Spec Validation Warnings (auto-generated)

  • CONTRADICTION: Entry signal and regime filter use the same indicator (RSI) at the same bar index with logically incompatible thresholds. BUY entry requires RSI[1] > 30 (oversold cross upward), but the regime filter 'bullishRegime = close[1] > sma50[1]' is defined separately using SMA. However, the spec states 'Do NOT use RSI thresholds to define regime' — this instruction is correctly followed. The actual contradiction arises in the SELL entry logic: SELL requires RSI[1] < 70 (overbought cross downward), which is a bearish signal. If the regime filter 'bullishRegime' is used in AND condition for both BUY and SELL entries without explicit negation, the SELL entry would require 'rsi[1] < 70 && rsi[2] >= 70 && bullishRegime == true', meaning a bearish RSI signal must occur while price remains above SMA50. This is theoretically possible but the spec does not explicitly state whether SELL uses '!bullishRegime' or 'bullishRegime'. If SELL also requires 'bullishRegime == true', then SELL entries become extremely rare (bearish RSI signal + bullish regime simultaneously). If SELL requires '!bullishRegime', this is not stated in the Entry logic section.
  • Fix: Explicitly state: 'SELL entry requires rsi[1] < InpOverbought && rsi[2] >= InpOverbought && !bullishRegime' (bearish regime). Or clarify that regime filter applies symmetrically: BUY in bullish regime, SELL in bearish regime (!bullishRegime).
  • CONTRADICTION: The spec mandates 'ONE regime variable only' and prohibits combining multiple regime variables (e.g., 'bullishRegime && regimeUp'). However, the Exit logic section states 'Primary exit: regime signal reverses (opposite regime state detected on confirmed bar[1])' without defining what 'opposite regime state' means operationally. If regime is defined solely as 'close[1] > sma50[1]', then 'opposite' is simply 'close[1] <= sma50[1]'. But the spec also mentions 'RSI sub-exit: if entry used RSI oversold signal, exit when RSI[1] returns above 50 (longs)' — this introduces a second exit regime (RSI > 50) independent of the SMA50 regime. If both exit conditions are active simultaneously (regime reversal AND RSI crosses 50), the exit logic becomes ambiguous: which takes precedence? If both must be true, the condition is over-constrained and may never trigger. If either can trigger, the spec should state 'OR' explicitly.
  • Fix: Clarify exit priority: (1) 'Exit on regime reversal OR RSI sub-exit, whichever comes first', or (2) 'Exit on regime reversal; RSI sub-exit is a secondary confirmation only if regime has not yet reversed'. Define 'opposite regime state' explicitly as a boolean expression.
  • WARNING: The spec states 'Partial close option: 50% at 0.75R, hold remainder for regime exit.' This implies two exit conditions for the same position: (1) partial close at 0.75R, (2) regime exit for the remainder. However, the spec also states 'max one position per symbol' and does not clarify whether the partial close reduces the position size or creates a separate position. If partial close modifies the existing position, the 'regime exit' condition must be re-evaluated on the reduced position. If the partial close is a separate exit order, the spec must define how the remaining position's stop-loss and regime exit are managed. The interaction between 'Partial close at 0.75R' and 'Primary exit: regime signal reverses' is not clearly sequenced, creating ambiguity in exit logic that could prevent consistent trade closure.
  • Fix: Define exit sequence explicitly: (1) 'If profit reaches 0.75R, close 50% immediately; hold remainder until regime reversal or max hold time', or (2) 'Regime reversal takes precedence; if regime reverses before 0.75R, close entire position'. Specify whether partial close modifies the position size for subsequent regime exit calculations.
  • WARNING: The spec prohibits 'regimeUp' or slope checks alongside 'bullishRegime', but does not explicitly define how SELL entries interact with the regime filter. Ensure SELL entry condition is documented as 'rsi[1] < InpOverbought && rsi[2] >= InpOverbought && !bullishRegime' to avoid ambiguity.
  • WARNING: The 'Contrarian safety filter: disable after consecutive false signals' is mentioned in Filters section but not defined operationally. Specify the threshold for 'consecutive false signals' (e.g., 3 consecutive non-triggering bars) and how this filter resets.
  • WARNING: The spec references 'Regime-specific confirmation filter from source evidence' but does not detail what this filter is. The source evidence mentions '月初の週 (1-5営業日)' (first week of month) and 'ギャップ方向' (gap direction) — clarify whether these are implemented as filters or merely background context.
  • WARNING: ATR(14)1.5 hard stop is defined, but the spec does not clarify whether this is measured from entry price or from the highest/lowest point during the hold. Specify: 'Hard stop = entry_price ± ATR(14)1.5' or 'Hard stop = highest_price_during_hold - ATR(14)*1.5' (for longs).
  • WARNING: The 'Minimum ATR activity filter' is listed but not quantified. Specify the minimum ATR threshold (e.g., 'ATR(14) > 0.005' or 'ATR(14) > 20 pips') to enable reproducible backtesting.
  • WARNING: The spec mentions 'max hold InpMaxBars bars (default=24)' but does not clarify whether this is measured from entry bar or from the bar after entry. Specify: 'Exit if current_bar_index - entry_bar_index >= InpMaxBars'.
  • WARNING: The 'Spread and session filter' is listed but not defined. Specify maximum spread threshold (e.g., 'spread < 2 pips') and active session hours (e.g., 'Tokyo 08:00-16:00 JST').
  • WARNING: Learning Feedback mentions 'loosen entry confirmation or session restriction' as a remedy for NO_TRADE failures, but the spec does not define what 'entry confirmation' means numerically. Clarify whether this refers to the RSI threshold (InpOversold, InpOverbought) or the number of bars required for confirmation (rsi[1] vs rsi[2] lookback).

Actual Pipeline Result

  • Final EA source: (内部成果物)
  • Backtest: USDJPY/H1, 2025.08.03-2026.01.30, model=1
  • Result: FAIL, PF=0.88, trades=724, profit=-3.50%, max DD=11.00%
  • Note: Compile errors and no-entry state were cleared; expectancy remains below the challenge threshold.
🇬🇧 Click to expand (English version)

Research EA Spec: Statistical Anomaly Reversal

EA Identity

  • EA name: REF0430_01_Statistical_Anomaly_Reversal_v1
  • Symbol: USDJPY
  • Timeframe:
  • Primary style: meta
  • Entry mechanism: oscillator_reversal
  • Regime target: any
  • Position logic: fixed_sl

Research Thesis

Statistical Anomaly Reversal candidate generated from 1 research source(s). The strategy must preserve the source idea while keeping parameters broad enough to survive out-of-sample testing.

Source Evidence

  • [SEASONAL] [MR] 月初の週 (1-5営業日) は機関の月次リバランスでドルが買われやすい傾向
  • [RISK] [SEASONAL] スワップポイントが正/負の通貨ペアで複数日ポジション保有時はスワップを損益計算に必ず含める
  • [ANOMALY] [FILTER] G10通貨ペアの相関は実際には高く、複数通貨同時保有は想定リスクの1.5-2倍と考える
  • [SEASONAL] [CONTRA] 月曜オープンのギャップ埋め戦略は統計的に確認されているが、ギャップ方向が先週トレンドの延長の場合は失敗率が高い

Tradable Spec

  • Entry logic: BUY entry: RSI(14) on bar[1] crosses above oversold threshold from below — rsi[1] > InpOversold && rsi[2] <= InpOversold (input default InpOversold=40). SELL entry: RSI crosses below overbought — rsi[1] < InpOverbought && rsi[2] >= InpOverbought (default=60). Regime filter: define using a separate 50-bar SMA — bullishRegime = (close[1] > sma50[1]). Do NOT use RSI thresholds to define regime, as that reuses the same indicator as the entry signal. ONE regime variable only: use ONLY bullishRegime in the entry AND condition — do NOT also add regimeUp or any slope check.
  • Exit logic: Primary exit: regime signal reverses (opposite regime state detected on confirmed bar[1]). RSI sub-exit: if entry used RSI oversold signal, exit when RSI[1] returns above 50 (longs) or below 50 (shorts). Hard stop: ATR(14)*1.5 beyond entry, fixed. Time exit: max hold InpMaxBars bars (default=24) — meta strategies degrade when held positionally. Partial close option: 50% at 0.75R, hold remainder for regime exit.
  • Risk management: Fixed fractional risk per trade, no martingale, no grid expansion, max one position per symbol, and hard daily loss guard.

Filters

  • Spread and session filter
  • Minimum ATR activity filter
  • Regime-specific confirmation filter from source evidence
  • Contrarian safety filter: disable after consecutive false signals

Logic Independence Requirements

Mandatory check (must verify before implementation):

  • Entry signal variables and regime filter variables must be calculated from independent data sources or independent lookback periods.
  • Bad example: bullishCross = fastMA[1] > slowMA[1] AND isBearishRegime = fastMA[1] < slowMA[1] — these cannot both be true on the same bar, resulting in zero trades.
  • Correct regime definition: slope of slowMA[1] - slowMA[10], higher timeframe MA direction, or slope over a long lookback (50+ bars).
  • When all filters are AND-combined, sketch-verify that at least one bar can theoretically trigger.
  • For mean-reversion strategies, always verify that "negation of entry condition ≠ regime condition".
  • When using the same indicator (RSI, BB, ATR, etc.) as both "signal source" and "filter source", confirm you are not demanding contradictory inequalities on the same bar.
  • Single regime variable only: Define exactly one bool variable (e.g., bullishRegime or uptrend) and use only that one variable in the entry AND condition. Ban combining two regime variables with AND (e.g., bullishRegime && regimeUp). If you need to judge across multiple axes (slope, price position, ADX), merge them into a single composite bool variable before AND-combining.

Optimization Envelope

  • Relaxable: confirmation thresholds, ATR activity threshold, session window, signal confirmation bars.
  • Not relaxable: stop-loss discipline, max one position, no martingale, no fixed historical price levels.
  • Initial optimization scope: 3-5 parameters only.
  • If no trades: loosen entry confirmation first, then session restriction, then ATR threshold.
  • If too many trades: strengthen regime filter and minimum signal distance.

Backtest Acceptance

  • Backtest at least 6 months with the latest 3 months held out.
  • Use walk-forward setting 6:2 when MT5 runner is available.
  • Reject if OOS/IS PF ratio is below 0.70 or if OOS PF min is below 1.10.
  • Reject if OOS trade count is too low; first loosen entry filters before optimizing profit targets.

Overfitting Controls

  • Keep each numeric parameter in a wide theory-backed range; do not tune to a single date range.
  • Limit optimization to 3-5 core parameters in the first pass.
  • Prefer regime filters with clear market meaning over curve-fitted thresholds.
  • Stop improving the candidate after repeated NO_TRADE/LOW_SAMPLE failures.

Learning Feedback

  • ledger: 1 prior tick-model mismatch hit(s) for this DNA
  • ledger: 1 prior infra/incomplete run(s) for this DNA
  • ledger: improve: loosen entry confirmation or session restriction before touching exits
  • ledger: improve: rerun the same candidate after repairing backtest artifacts
  • ledger: improve: prefer theory-backed ranges and freeze nonessential parameters
  • ledger: improve: rerun with every-tick backtest before loosening entries because bar-based tests may miss tick-sensitive triggers
  • ledger: improve: widen active sessions or simplify filters to increase sample size

Implementation Guardrails

  • [META] [RISK] [CONTRA] MT5 Strategy Testerは同名EAのinput値をキャッシュすることがあり、mq5側のinputデフォルトを変更して再コンパイルしても、BTでは前回値が使われる場合がある。inputデフォルト変更の検証では、別EA名/別ファイル名にするか、tester.ini/ExpertParametersで明示的に値を渡し、Testerログの「started with inputs」を必ず確認する。 (.clinerules)
  • [RISK] [META] [CONTRA] 【部分決済後のコメント管理パターン】MQL5ではPositionModifyでコメントを変更できないため、TP1部分決済後の状態管理にコメントプレフィックスを使う設計は「二重部分決済」リスクを内包する。対策として: (1)グローバルなulong配列でTP1済みチケットを管理する、(2)部分決済後に残りを即クローズ→新コメントで再エントリーする、のいずれかのパターンを採用すること。 (.clinerules)
  • [RISK] DEAL_POSITION_IDによるトレード集計: 部分決済を含むポジションでは同一ポジション由来の複数DEALが発生する。連敗カウント等のトレード単位集計にはDEAL_COMMENTではなくDEAL_POSITION_IDを使用し、カウント済みIDを配列で管理することで重複計上を防ぐ。 (.clinerules)
  • [RISK] 【OnTradeTransactionによる決済検出パターン】ポジションクローズの検出にはOnTradeTransaction(trans.type == TRADE_TRANSACTION_DEAL_ADD && DEAL_ENTRY_OUT)を使用し、DEAL_POSITION_IDでエントリー管理配列と照合する設計が堅牢。HistorySelectによるポーリング方式より確実でリアルタイム性が高い。 (.clinerules)
  • [TREND] [BREAKOUT] [FILTER] [META] マルチタイムフレームEAでATR等のボラティリティ指標をCopyBufferする際、エントリー判定用の価格・MA(start_pos=1で確定足参照)とATR(start_pos=0で未確定バー参照)でstart_posが混在しやすい。設計方針として「全バッファのstart_posを統一する」か「ATRのみ最新値を使う理由をコメントで明記する」かを決めておくべき。 (.clinerules)
  • [FILTER] SYMBOL_SPREADはポイント単位のlong値を返すため、価格単位に変換するには* _Pointを直接使用する (.clinerules)
  • [FILTER] スキャルピングEAでXAUUSD等のスプレッド変動が大きい銘柄を扱う場合、pips単位ではなく価格単位(ドル)でスプレッド閾値・トレランスを指定する設計が適切。_Digits==2環境ではpips×_Pointが意図しない極小値になる (.clinerules)
  • [TREND] [FILTER] スプレッドリトライパターン(予約エントリーのスプレッド不良時リトライ): 予約フラグ方式でスプレッド不良時に即破棄せず、MAX_SPREAD_RETRY回まで次バーで再試行する設計。リトライカウンターは予約フラグと同時にリセットし、クールダウンや金曜制限等の他条件で予約破棄する際もリセットを忘れないこと。リトライの粒度(ティック単位 vs バー単位)を設計時に明確にすべき。 (.clinerules)

Story Package

  • Hook: AI autonomously discovered "Statistical Anomaly Reversal" from research notes and converted it into an EA for verification.
  • Blog angle: Can a research idea truly be reproduced on MT5? We publish results all the way through to OOS decay.
  • Failure angle: Failures are classified as NO_TRADE / LOW_SAMPLE / OVERFIT / HIGH_DD and fed into the next research candidate pipeline.

Spec Validation Warnings (auto-generated)

  • CONTRADICTION: Entry signal and regime filter use the same indicator (RSI) at the same bar index with logically incompatible thresholds. BUY entry requires RSI[1] > 30 (oversold cross upward), but the regime filter 'bullishRegime = close[1] > sma50[1]' is defined separately using SMA. However, the spec states 'Do NOT use RSI thresholds to define regime' — this instruction is correctly followed. The actual contradiction arises in the SELL entry logic: SELL requires RSI[1] < 70 (overbought cross downward), which is a bearish signal. If the regime filter 'bullishRegime' is used in AND condition for both BUY and SELL entries without explicit negation, the SELL entry would require 'rsi[1] < 70 && rsi[2] >= 70 && bullishRegime == true', meaning a bearish RSI signal must occur while price remains above SMA50. This is theoretically possible but the spec does not explicitly state whether SELL uses '!bullishRegime' or 'bullishRegime'. If SELL also requires 'bullishRegime == true', then SELL entries become extremely rare (bearish RSI signal + bullish regime simultaneously). If SELL requires '!bullishRegime', this is not stated in the Entry logic section.
  • Fix: Explicitly state: 'SELL entry requires rsi[1] < InpOverbought && rsi[2] >= InpOverbought && !bullishRegime' (bearish regime). Or clarify that regime filter applies symmetrically: BUY in bullish regime, SELL in bearish regime (!bullishRegime).
  • CONTRADICTION: The spec mandates 'ONE regime variable only' and prohibits combining multiple regime variables (e.g., 'bullishRegime && regimeUp'). However, the Exit logic section states 'Primary exit: regime signal reverses (opposite regime state detected on confirmed bar[1])' without defining what 'opposite regime state' means operationally. If regime is defined solely as 'close[1] > sma50[1]', then 'opposite' is simply 'close[1] <= sma50[1]'. But the spec also mentions 'RSI sub-exit: if entry used RSI oversold signal, exit when RSI[1] returns above 50 (longs)' — this introduces a second exit regime (RSI > 50) independent of the SMA50 regime. If both exit conditions are active simultaneously (regime reversal AND RSI crosses 50), the exit logic becomes ambiguous: which takes precedence? If both must be true, the condition is over-constrained and may never trigger. If either can trigger, the spec should state 'OR' explicitly.
  • Fix: Clarify exit priority: (1) 'Exit on regime reversal OR RSI sub-exit, whichever comes first', or (2) 'Exit on regime reversal; RSI sub-exit is a secondary confirmation only if regime has not yet reversed'. Define 'opposite regime state' explicitly as a boolean expression.
  • WARNING: The spec states 'Partial close option: 50% at 0.75R, hold remainder for regime exit.' This implies two exit conditions for the same position: (1) partial close at 0.75R, (2) regime exit for the remainder. However, the spec also states 'max one position per symbol' and does not clarify whether the partial close reduces the position size or creates a separate position. If partial close modifies the existing position, the 'regime exit' condition must be re-evaluated on the reduced position. If the partial close is a separate exit order, the spec must define how the remaining position's stop-loss and regime exit are managed. The interaction between 'Partial close at 0.75R' and 'Primary exit: regime signal reverses' is not clearly sequenced, creating ambiguity in exit logic that could prevent consistent trade closure.
  • Fix: Define exit sequence explicitly: (1) 'If profit reaches 0.75R, close 50% immediately; hold remainder until regime reversal or max hold time', or (2) 'Regime reversal takes precedence; if regime reverses before 0.75R, close entire position'. Specify whether partial close modifies the position size for subsequent regime exit calculations.
  • WARNING: The spec prohibits 'regimeUp' or slope checks alongside 'bullishRegime', but does not explicitly define how SELL entries interact with the regime filter. Ensure SELL entry condition is documented as 'rsi[1] < InpOverbought && rsi[2] >= InpOverbought && !bullishRegime' to avoid ambiguity.
  • WARNING: The 'Contrarian safety filter: disable after consecutive false signals' is mentioned in Filters section but not defined operationally. Specify the threshold for 'consecutive false signals' (e.g., 3 consecutive non-triggering bars) and how this filter resets.
  • WARNING: The spec references 'Regime-specific confirmation filter from source evidence' but does not detail what this filter is. The source evidence mentions '月初の週 (1-5営業日)' (first week of month) and 'ギャップ方向' (gap direction) — clarify whether these are implemented as filters or merely background context.
  • WARNING: ATR(14)1.5 hard stop is defined, but the spec does not clarify whether this is measured from entry price or from the highest/lowest point during the hold. Specify: 'Hard stop = entry_price ± ATR(14)1.5' or 'Hard stop = highest_price_during_hold - ATR(14)*1.5' (for longs).
  • WARNING: The 'Minimum ATR activity filter' is listed but not quantified. Specify the minimum ATR threshold (e.g., 'ATR(14) > 0.005' or 'ATR(14) > 20 pips') to enable reproducible backtesting.
  • WARNING: The spec mentions 'max hold InpMaxBars bars (default=24)' but does not clarify whether this is measured from entry bar or from the bar after entry. Specify: 'Exit if current_bar_index - entry_bar_index >= InpMaxBars'.
  • WARNING: The 'Spread and session filter' is listed but not defined. Specify maximum spread threshold (e.g., 'spread < 2 pips') and active session hours (e.g., 'Tokyo 08:00-16:00 JST').
  • WARNING: Learning Feedback mentions 'loosen entry confirmation or session restriction' as a remedy for NO_TRADE failures, but the spec does not define what 'entry confirmation' means numerically. Clarify whether this refers to the RSI threshold (InpOversold, InpOverbought) or the number of bars required for confirmation (rsi[1] vs rsi[2] lookback).

Actual Pipeline Result

  • Final EA source: (内部成果物)
  • Backtest: USDJPY/H1, 2025.08.03-2026.01.30, model=1
  • Result: FAIL, PF=0.88, trades=724, profit=-3.50%, max DD=11.00%
  • Note: Compile errors and no-entry state were cleared; expectancy remains below the challenge threshold.

免責事項

本EAは自動生成された検証用コードです。実運用可否はご自身で検証してください。

EA1000 一覧に戻る


関連用語

— SPONSORED —