Asian_Session_MA_Cross_Scalp¶
EA0233_Asian_Session_MA_Cross_Scalp_v1.0 / ⚠️ FAILED — 生成失敗・修正失敗・BT不合格
ワンライナー
Asian Session MA Cross Scalp
判定: 🟠 惜敗(惜敗(過学習の見本))
自律生成EA。IS好成績もOOSで過学習露呈。カーブフィットの見本(取引42件)。
自律生成ライン(網羅的に量産)
基本情報¶
| 項目 | 値 | 項目 | 値 | |
|---|---|---|---|---|
| シンボル | GBPJPY | エントリー種別 | mean_cross | |
| 時間足 | M15 | エグジット | fixed_sl | |
| 方向 | both | 主要インジケータ | — |
🧬 DNA 5軸¶
| primary_style | entry_mechanism | regime_target | position_logic | core_indicator_family |
|---|---|---|---|---|
scalp | mean_cross | ranging | fixed_sl | moving_average |
📊 バックテスト結果¶
判定: ❌ FAIL / 期間: 2026.03.28 〜 2026.05.12
| PF | 損益率 | 勝率 | 最大DD | シャープ | 取引数 |
|---|---|---|---|---|---|
| 0.80 | -3.72% | 52.4% | 6.83% | -5.00 | 42 |
📝 仕様書 / Specification¶
クリックで展開
リサーチEA仕様書: Asian Session MA Cross Scalp¶
EA識別情報¶
- EA名: REF0809_01_Asian_Session_MA_Cross_Scalp_v1
- 通貨ペア: EURJPY
- 時間足: M15
- プライマリスタイル: scalp
- エントリーメカニズム: mean_cross
- レジームターゲット: ranging
- ポジションロジック: fixed_sl
- コアインジケーター系統: moving_average
- キャプチャ意図: middle (head=新規の頭を取る / middle=頭と尻尾を渡す / tail=枯れ際の反転を取る)
リサーチテーゼ¶
Asian Session MA Cross Scalp candidate generated from 4 research source(s). The strategy must preserve the source idea while keeping parameters broad enough to survive out-of-sample testing.
根拠ソース¶
- [FILTER] 現在のレジーム指紋リーダーは逆張り/リバージョン系。同族の新規EAはまず発火しやすく、逆族はエントリー0本リスクが相対的に高い。
- [META] [FILTER] ブローカー毎のスプレッド・約定遅延で EA の実効利益は 20-50% 変動する
- [FILTER] [STATS] 東京市場 (09:00-15:00 JST) はスプレッド拡大・流動性低下で短期戦略のコスト負けが多い
- [FILTER] ADX trend strength フィルター: 閾値 20-30 の間が実用域、30超は過剰に絞り込みすぎ
トレード仕様¶
以下5点は必須です。いずれかが欠落・空欄の場合、この仕様書は不合格としてください。
1. Entry logic(エントリー条件)¶
BUY entry (trend-following): fast SMA crosses above slow SMA on confirmed bar[1] (fastMA[1] > slowMA[1] && fastMA[2] <= slowMA[2]) AND bullishRegime. This is a CLASSIC trend-following MA cross: buy when the faster MA crosses above the slower MA in an uptrend. SELL entry (trend-following): fast SMA crosses below slow SMA (fastMA[1] < slowMA[1] && fastMA[2] >= slowMA[2]) AND bearishRegime. This is a CLASSIC trend-following MA cross: sell when the faster MA crosses below the slower MA in a downtrend. CRITICAL — Regime MUST be independent from cross signal, SAME timeframe: Define regime using a 50-bar SMA slope on the SAME timeframe — completely independent from the fast/slow MA cross. bullishRegime = (sma50[1] - sma50[10]) > slopeThreshold (default slopeThreshold = 0.0001 * _Point). bearishRegime = (sma50[1] - sma50[10]) < -slopeThreshold. SMA50 slope uses a DIFFERENT lookback (50 vs 10 for cross) and DIFFERENT calculation (slope vs cross) than the entry signal. ONE regime variable only: declare a single bool bullishRegime and use it in the entry AND condition — do NOT add a second slope variable. SAME timeframe rule: NEVER use D1 RSI or higher-timeframe indicators for regime when entry is on H1/H4. Regime and trigger must be evaluated on the same timeframe to avoid temporal misalignment and zero trades.
2. Exit logic(決済条件)¶
Exit trigger: reverse MA cross (fast SMA crosses back through slow SMA in opposite direction). Regime exit (faster): if the SMA50 slope flips against the position (bullishRegime -> bearishRegime or vice versa), close before reverse cross. Hard stop: initial ATR-based SL (InpSLATR * atr[1], default=1.5) — fixed, not trailed. No fixed TP target — the cross itself manages the exit. Time exit: close if held more than InpMaxBars (default=18 bars on H4, equivalent to about 3 days) without exit signal.
2.5 キャプチャ意図に基づく Exit Discipline (拘束)¶
キャプチャ意図: MIDDLE — Middle capture: give up the head and the tail. The EA must not chase the extension; it locks in a measured portion and steps aside.
- TP: ATR(14, bar[1]) × 1.5
- SL: ATR(14, bar[1]) × 1.5
- トレイル: トレイル禁止
- 時間切れ: 15 bars
- 部分決済: +1.0*ATR で 50% 部分決済 + 残りは建値SLへ
EA 実装ガードレール (絶対遵守):
- NEVER add a trailing stop — middle capture forbids tail-chasing.
- TP and SL are equal in ATR multiples (1.5 each); do NOT widen TP > SL.
- Time exit at 15 bars is mandatory; do NOT extend in pursuit of further gains.
- Partial close at +1.0*ATR with BE stop is the only allowed exit refinement.
- After successful partial close, return/continue immediately; move BE stop only after refreshed position state on a later tick/new bar.
参考 MQL5 擬似コード (実装の出発点):
double atrAtEntry = iATR(_Symbol, _Period, 14)[1];
double tp = entryPrice + side * 1.5 * atrAtEntry;
double sl = entryPrice - side * 1.5 * atrAtEntry;
// NO trailing stop — middle capture explicitly refuses to chase the tail.
// Partial close: close 50% of position at +1.0 * atrAtEntry favorable excursion.
if (favorableExcursion >= 1.0 * atrAtEntry && !partialClosed) {
if (ClosePartial(0.5)) {
partialClosed = true;
pendingBreakEven = true;
return; // wait for refreshed position state before stop modification
}
}
if (pendingBreakEven && refreshedPositionState) {
ModifyStop(entryPrice);
}
// Time exit: 15 bars from entry, regardless of P/L.
if (barsHeld >= 15) { ClosePosition("middle_time_exit"); }
上記の Exit Discipline は section 2 (Exit logic) と矛盾する場合、Exit Discipline を優先してください。 メカニズム別の Exit 指示は同方向性の確認、Capture Intent の指示は拘束的な数値規律です。
3. Risk management(資金管理)¶
Fixed fractional risk per trade, no martingale, no grid expansion, max one position per symbol, and hard daily loss guard.
4. Regime filter(レジームフィルター)¶
ranging regime confirmation using SAME timeframe indicators only
5. Invalidation condition(無効化条件)¶
If walk-forward repeatedly shows OOS PF < 1.0 or trades collapse after loosening entry filters, archive the DNA.
5点構造チェック: 上記5セクションがすべて記載されていることを確認してください。
フィルター¶
- Spread and session filter
- Regime-specific confirmation filter from source evidence
- Minimum sample count filter before accepting optimization
ロジック独立性要件¶
必須チェック(実装前に確認すること):
- エントリーシグナル変数とレジームフィルター変数は独立したデータ源または独立した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 に組み込むこと。
Primitive Execution Lane¶
- レーン: VERIFIED
- 検証済みprimitive:
- entry:mean_cross (moving-average cross trigger)
- position:fixed_sl (fixed-risk SL/TP with optional time exit)
- experimental primitive:
- none
- 判定理由:
- All detected strategy and position mechanics map to verified primitives
- 実装方針: 発想はentry/regime/filterに閉じ込め、発注・部分決済・建値移動・日次停止は検証済みprimitiveを使う。experimentalの場合は専用helperに隔離する。
最適化許容範囲¶
- 緩和可能: 確証閾値、ATR活性閾値、セッションウィンドウ、シグナル確証バー数。
- 緩和不可: 損切り規律、最大ポジション数1、過去の固定価格水準の不使用。
- 明示的に正当化される場合のみ特殊アプローチを許可: ブローカー非対称性の活用、出金ありマーチンゲール戦略、逆張りセンチメントフェード、地政学イベント裁定、構造的レイテンシエッジ、量子風最適化、群知能ポジションサイジング、ゲーム理論的マーケットメイキング。
- 特殊アプローチを使用する場合は以下を必須記載: (1) 1トレードおよび1日あたりの厳密なリスク上限(pips/%)、(2) キルスイッチ条件(取引停止条件)、(3) 構造的エッジの存在根拠、(4) エッジ消失時の標準ルールへのフォールバック。
- 多様性指令: レジストリ内の既存EAがほとんどTREND系ならMRかBREAKOUTを生成。ほとんどテクニカル指標ベースなら、異常/季節/レジームベースまたは学際的(物理/生物/心理)アプローチを生成。未探索の角度を追求すること。
- 初期最適化範囲: 3〜5パラメータのみ。
- 取引ゼロの場合: まずエントリー確証を緩和、次にセッション制限、次にATR閾値を緩和。
- 取引過多の場合: レジームフィルターと最小シグナル距離を強化。
バックテスト合格基準¶
- Backtest at least 24 months with the latest 3 months held out.
- Use walk-forward setting 4: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 below 15 trades per held-out window (minimum 30 total); first loosen entry filters before optimizing profit targets.
- OOS PF is the only success metric. IS PF is parameter sanity, not the headline.
- A profitable strategy must answer 'why does this work?' from a stated hypothesis (microstructure, behavioral bias, seasonal anomaly, regime shift). Chains of indicators with no thesis are presumed curve-fit.
過学習対策¶
- Robust > Profitable. A PF=1.20 strategy that survives every OOS window beats a PF=2.50 one that wins in one window and crashes in another.
- Keep each numeric parameter in a wide theory-backed range; do not tune to a single date range.
- Use canonical defaults (RSI=14, ATR=14, BB=20/2, MA=20/50/200). Magic numbers (RSI=17, ATR=23, BB=18/1.7) are a red flag of curve-fitting unless the spec cites prior research justifying that exact value.
- Limit optimization to 3-5 core parameters in the first pass.
- Forbid AND-chains of more than 4 filters at entry. Each added filter shrinks sample size and looks like edge but is usually fit.
- If a single time-of-day or day-of-week window dominates the trade history, the edge is calendar artifact, not strategy.
- Prefer regime filters with clear market meaning over curve-fitted thresholds.
- Stop improving the candidate after repeated NO_TRADE/LOW_SAMPLE failures.
学習フィードバック¶
- Avoid past failure: 【根本的失敗】全4ウィンドウでIS/OOS共にPF≈0.01〜0.05という壊滅的な水準。 勝率は61〜72%と高いにもかかわらずPF=0.03という矛盾は、 「平均損失(avg_loss≈2,500〜2,900)が平均利益(avg_win≈730〜975)の 約3倍」というペイオフ比の根本的な歪みに起因する。 【具体的な失敗メカニズム】 1. SL=TP=1.5×ATRの対称設定にもかかわらず実際の損失が利益の3倍超になっている。 これはアジアセッション(低ボラ)でエントリーし、ロンドン/NY時間に 大きなトレンドで逆行してSLを大きく超えてスリッページ・ギャップで ストップアウトされる「セッション跨ぎの方向性リスク」が原因と推定される。
- EURUSDのM15アジアセッションでSMAクロスを使うと、 レンジ相場でのダマシクロスが頻発し、逆方向への大きな動きに巻き込まれる。
- レジームフィルター(SMA50スロープ閾値0.5pips)が緩すぎて 実質的にフィルタリング機能を果たしていない。
- 部分決済後のブレークイーブン移動が機能する前に大損失が発生している。 5. IS/OOS逆転(OOS>IS)が全試行で一貫して発生しており、 ISウィンドウが特定の困難な相場レジーム(強トレンド・高ボラ期)に 偏っていた可能性があるが、いずれにせよ全ウィンドウでPF<0.1は 戦略の構造的欠陥を示す。
- 3回の改善試行でPF改善幅<0.05と変化なし=パラメータ調整では 解決不可能な根本的ロジック欠陥。 -> Pivot hint: 【変更すべき軸(優先順)】
-
【最優先】エントリーロジックの完全刷新: SMAクロスをアジアセッションのレンジブレイクアウト戦略に変更する。 具体的にはアジアセッション高値/安値のブレイクアウト(ロンドンオープン前後) をエントリーシグナルとし、方向性のある動きを捉える設計に転換する。
-
【ペイオフ比の修正】TP:SL比を非対称に設定する(例:TP=3×ATR、SL=1×ATR)。 現在のSL=TP=1.5×ATRは理論上RR=1:1だが実際は1:3の逆転が起きており、 少なくともTP=2.5〜3×ATRに拡大してペイオフ比を改善する必要がある。
-
【時間足変更】M15→H1またはH4に切り替える。 アジアセッションのM15はノイズが多くSMAクロスのダマシが頻発する。 H1以上ではクロスシグナルの信頼性が向上する。
-
【シンボル変更】EURUSDからGBPJPY(本来の設計対象)またはUSDJPYに変更する。 アジアセッションの流動性・ボラティリティ特性がEURUSDとは大きく異なる。
-
【セッション戦略の転換】アジアセッション内でのスキャルプではなく、 「アジアレンジ確定後のロンドンオープンブレイクアウト」戦略に変更する (セッション終了時刻=エントリートリガーとして活用)。
-
【レジームフィルター強化】SMA50スロープ閾値を0.5pipsから 5〜10pips相当に引き上げるか、ADXフィルター(ADX>25)を追加して 真のトレンド相場のみでエントリーする。
- Avoid past failure: 【根本的失敗要因】
-
ペア・時間足のミスマッチ: コードはGBPJPY H4向けに設計(スプレッド上限5pips、 最小ATR10pips等)されているが、バックテストはEURUSD H4で実施。 パラメータが対象通貨ペアに最適化されておらず、フィルター条件が機能しなかった。
-
壊滅的なペイオフ比率の歪み: 勝率84%(attempt1)にもかかわらずPF=0.31。 平均勝ちトレード約3,800USD に対し平均負けトレード約9,247USD(損益比1:2.4の逆転)。 TP=ATR×1.5、SL=ATR×1.5で設計上は1:1のはずが、半決済後にBEへ移動する Exit Disciplineが実質的にTPを縮小させ、SLはフルサイズのまま残るため 非対称な損失構造が生まれた。
-
プルバック条件の論理的欠陥: 買いシグナルの条件が 「close[2] < slowSMA[2] + ATR×1.5」(SMAより上にいる状態)であり、 本来のプルバック(SMAに近づく/下回る)を捉えていない。 SMAより上にある状態をプルバックと誤認しており、トレンド追従の エントリータイミングが根本的に間違っている。
-
1本反転確認の信頼性不足: H4足で「close[1] > close[2]」という 1本の陽線確認だけでは、レンジ相場やノイズに対して過剰反応する。 全ウィンドウでIS/OOS共にPF 0.14〜0.27と一貫して低く、 相場環境を問わず機能しないことが証明された。
-
サンプル数の慢性的不足: H4足×2年間で19〜40トレードと極めて少なく、 統計的有意性が確保できない。条件が厳しすぎてエントリー機会を逃している。 -> Pivot hint: 【次に変えるべき軸】
-
ペア統一: コード設計通りGBPJPYでバックテストを実施する(EURUSDは破棄)。 またはEURUSD専用にパラメータを再設計(最大スプレッド2pips、最小ATR8pips等)。
-
プルバック条件の修正: 買いシグナルは「close[2] < slowSMA[2]」(SMAを下回る) または「close[2] < slowSMA[2] + ATR×0.3」(SMAに接近)に変更し、 真のプルバックを捉えるロジックに修正する。
-
Exit構造の再設計: 半決済+BEシフトがペイオフ比率を破壊しているため、 半決済を廃止してTP=ATR×2.0、SL=ATR×1.0(RR=2:1)の非対称構造に変更する。 または半決済後の残りポジションのTPをATR×3.0まで延長してRRを回復させる。
-
時間足の変更: H4では2年間でサンプル不足のため、H1に切り替えて エントリー頻度を4倍に増やし統計的有意性を確保する。 ただしスプレストコストに注意。
-
トレンドフィルターの強化: SMA50スロープだけでなく、 SMA200との位置関係(price > SMA200 = 強気レジーム)や ADX > 25のトレンド強度フィルターを追加して、 レンジ相場でのフォールスシグナルを排除する。
-
複数バー確認の導入: 1本反転確認を「直近3本のうち2本が反転方向」 またはピンバー・エンゴルフィングパターン等のローソク足パターン確認に 変更してシグナル品質を向上させる。
- ledger: 1 prior strategy failure(s) for this DNA
- ledger: 1 prior infra/incomplete run(s) for this DNA
- ledger: recent failure streak penalty applied (⅕ strategy failures)
- ledger: recent incomplete/infrastructure penalty applied (⅕ runs)
- ledger: improve: reduce parameter count and replace brittle thresholds with regime logic
- ledger: improve: rerun the same candidate after repairing backtest artifacts
- [DIVERSITY-GRADE] headroom empty; shipped as nearest-variant.
実装ガードレール¶
- [PRIMITIVE-LANE: VERIFIED] Keep creativity in entry/regime/filter logic; use verified execution primitives only.
- [PRIMITIVE-LANE: VERIFIED] Mapped primitives: entry:mean_cross (moving-average cross trigger); position:fixed_sl (fixed-risk SL/TP with optional time exit).
- [PRIMITIVE-LANE: VERIFIED] Do not introduce martingale/grid/latency/arbitrage execution mechanics during MQL5 generation.
- [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)
- [STATS] [META] スリッページ許容値(SetDeviationInPoints)はinputパラメータ化することで、バックテストや運用時の調整が容易になる (.clinerules)
- [TREND] [BREAKOUT] [FILTER] [META] マルチタイムフレームEAでATR等のボラティリティ指標をCopyBufferする際、エントリー判定用の価格・MA(start_pos=1で確定足参照)とATR(start_pos=0で未確定バー参照)でstart_posが混在しやすい。設計方針として「全バッファのstart_posを統一する」か「ATRのみ最新値を使う理由をコメントで明記する」かを決めておくべき。 (.clinerules)
- [META] HistorySelect(0, TimeCurrent()) は全取引履歴を走査対象にするため、長期運用や多数の取引がある口座ではパフォーマンスに影響する。連敗カウント等の直近履歴のみが必要な場合は、開始時刻を限定する(例: TimeCurrent() - 30243600)か、最後のチェック時刻を記録して差分走査にする。 (.clinerules)
- [META] MQL5のOnTradeTransactionではDEAL_ENTRY_INOUTも処理対象に含めないと、ネッティング口座での約定イベントを捕捉できない場合がある (.clinerules)
- [META] OnTradeTransactionでHistoryDealSelectを使用する際、DEAL_ENTRY_OUTとDEAL_ENTRY_INOUTの両方を処理することで、ネッティング口座とヘッジ口座の両方に対応できる。この2値チェックパターンは連敗カウント等の決済イベント処理の標準実装として有効。 (.clinerules)
- [META] OnTradeイベントでHistorySelect(0, TimeCurrent())による全履歴スキャンは、取引履歴が長期化するとパフォーマンス劣化を招く。g_last_processed_dealに対応する時刻を別途保持し、HistorySelectの開始時刻を直近に絞り込むパターンが推奨される。 (.clinerules)
ストーリーパッケージ¶
- フック: AIが研究メモから自律発掘した「Asian Session MA Cross Scalp」をEA化して検証。
- ブログアングル: 研究アイデアは本当にMT5で再現できるのか、OOSで崩れるかまで公開する。
- 失敗アングル: 失敗時は NO_TRADE / LOW_SAMPLE / OVERFIT / HIGH_DD に分類して次の研究候補へ進む。
Spec Validation Warnings (auto-generated)¶
- CONTRADICTION: Entry logic specifies trend-following MA cross (BUY: fastMA[1] > slowMA[1] && fastMA[2] <= slowMA[2]) AND bullishRegime. However, bullishRegime is defined as SMA50 slope: (sma50[1] - sma50[10]) > slopeThreshold. On the same bar[1], if fastMA[1] > slowMA[1] (uptrend cross signal), the SMA50 slope can theoretically be negative or near-zero, making bullishRegime false. Conversely, if bullishRegime is true (SMA50 slope positive), the fast/slow MA cross may not have just occurred on bar[1]. The regime definition uses a 50-bar SMA slope (comparing bar[1] to bar[10]), which is a DIFFERENT indicator family and lookback from the entry cross (fast vs slow MA). While the specification claims independence, the practical issue is that a bullish SMA50 slope does NOT guarantee a fresh MA cross on the same bar, and a fresh MA cross does NOT guarantee a bullish SMA50 slope at that exact moment. This creates a temporal/logical gap: the entry signal (cross) and regime confirmation (slope) are evaluated on the same bar[1] but measure different phenomena with different lag structures. In ranging or choppy markets, the SMA50 slope may lag the fast MA cross by several bars, causing the AND condition to fire rarely or not at all.
- Fix: Clarify the temporal relationship: either (1) allow regime to lag by 1-2 bars (e.g., use sma50[2] - sma50[11] for regime while cross is on bar[1]), (2) define bullishRegime using a faster slope lookback (e.g., sma50[1] - sma50[5]) to align timing with the cross, or (3) add a secondary confirmation that the cross occurs AFTER regime has been established for at least N bars. Alternatively, use ADX or a separate trend indicator (not MA-based) for regime to eliminate the lag ambiguity. Backtest to confirm that AND-combined conditions fire on at least 15+ trades per OOS window.
- CONTRADICTION: The specification requires 'ranging regime confirmation' (section 4) but the entry logic is defined as trend-following MA cross with bullishRegime/bearishRegime (section 1). A ranging regime typically means price oscillates within a band with no strong directional bias, while a bullish/bearish regime means a directional trend exists. These are opposite regime types. The specification states the strategy targets 'ranging' regime (from EA metadata: 'レジームターゲット: ranging') but the entry logic requires a bullish or bearish regime. This is a fundamental contradiction: you cannot simultaneously require a ranging market AND a bullish/bearish trend. Either the regime target should be 'trending' (not 'ranging'), or the entry logic should be redefined as a mean-reversion/contrarian strategy that trades WITHIN a range (e.g., buy when price touches lower BB in a ranging market).
- Fix: Clarify the regime target: (1) If the strategy is trend-following (as the MA cross logic suggests), change 'レジームターゲット' from 'ranging' to 'trending'. (2) If the strategy is meant to trade in ranging markets, redefine the entry logic as a mean-reversion strategy (e.g., buy when fastMA crosses above slowMA AND price is in lower half of Bollinger Bands AND ADX < 25). (3) If 'ranging' means 'not in extreme volatility', define it as ATR < threshold or Bollinger Band width < threshold, and add this as an additional filter (not a regime replacement). Backtest both interpretations and document which regime type actually produces positive OOS PF.
- WARNING: Exit Discipline (section 2.5) specifies TP = ATR × 1.5 and SL = ATR × 1.5 with time exit at 15 bars. However, section 2 (Exit logic) states 'No fixed TP target — the cross itself manages the exit' and 'Time exit: close if held more than InpMaxBars (default=18 bars on H4)'. These are contradictory: section 2.5 mandates a fixed TP of 1.5ATR and a 15-bar time exit, while section 2 forbids a fixed TP and specifies 18 bars. The specification states 'If Exit Discipline contradicts section 2, Exit Discipline takes priority', so the implemented logic should use TP=1.5ATR and 15-bar exit. However, the presence of this contradiction in the source document itself creates ambiguity for the implementer and suggests the specification was not fully reconciled before release.
- Fix: The specification correctly prioritizes Exit Discipline (2.5) over Exit logic (2), so implementers should use TP=1.5ATR and 15-bar time exit. However, remove or reconcile the conflicting language in section 2 to avoid implementer confusion. Recommend: rewrite section 2 to state 'Exit trigger: reverse MA cross OR fixed TP at 1.5ATR OR time exit at 15 bars, whichever occurs first. Regime exit (faster): if SMA50 slope flips, close before reverse cross. Hard stop: ATR-based SL at 1.5*ATR.'
- WARNING: Section 2.5 (Exit Discipline) introduces a partial close mechanism (50% at +1.0ATR with BE stop) that is not mentioned in section 2 (Exit logic). While the specification prioritizes Exit Discipline, the implementer must ensure that the partial close logic is correctly integrated with the reverse MA cross exit and time exit. Specifically: (1) confirm that after a partial close, the remaining position is still governed by the same TP/SL/time exit rules, (2) ensure that the BE stop modification does not interfere with the hard SL at 1.5ATR, and (3) test that the 'refreshedPositionState' logic does not cause unintended delays in stop modification. Recommend: add explicit pseudocode or flowchart showing the interaction between partial close, BE stop, and final exit.
- WARNING: The specification requires 'SAME timeframe rule: NEVER use D1 RSI or higher-timeframe indicators for regime when entry is on H1/H4' (section 1, CRITICAL note). However, the EA is defined on M15 timeframe, and the regime is defined using SMA50 slope on the same M15 timeframe. This is compliant, but the specification does not clarify whether intraday session filters (e.g., 'close if held more than 15 bars') should also respect the same-timeframe rule. If a session filter uses a higher timeframe (e.g., 'do not enter during Tokyo session 09:00-15:00 JST'), ensure that the session time is evaluated independently of the M15 bars and does not create a temporal mismatch. Recommend: explicitly define session filter logic (e.g., 'if (Hour() >= 9 && Hour() < 15) { skip entry }') and test that it does not cause zero trades on certain days.
- WARNING: The specification mentions 'Spread and session filter' (section on フィルター) but does not provide concrete implementation details. The 'Source Evidence' section notes that 'Tokyo market (09:00-15:00 JST) has spread expansion and low liquidity', but this is not translated into a specific filter condition in the Filters section. Recommend: add explicit filter logic such as 'if (Hour() >= 9 && Hour() < 15) { skip entry }' or 'if (Bid - Ask > maxSpreadPips) { skip entry }' and backtest to confirm that the filter improves OOS PF without reducing trade count below 15 per OOS window.
- WARNING: The specification requires 'Regime-specific confirmation filter from source evidence' (section on フィルター) but does not define what 'regime-specific confirmation' means in the context of a trending MA cross strategy. If the strategy is trend-following, the regime confirmation should be a trend strength filter (e.g., ADX > 20). If the strategy is mean-reversion, the regime confirmation should be a range/volatility filter (e.g., ATR < threshold). The current specification is ambiguous. Recommend: clarify whether the bullishRegime/bearishRegime SMA50 slope is the only regime confirmation, or whether an additional filter (ADX, ATR, Bollinger Band width) should be added.
- WARNING: The specification states 'Minimum sample count filter before accepting optimization' but does not define the minimum sample count. Recommend: add explicit rule such as 'reject optimization if OOS trade count < 15 per window' or 'reject if total OOS trades < 30 across all windows'.
- WARNING: The specification forbids 'trailing stop' (section 2.5) but does not clarify whether a 'break-even stop' (moving SL to entry price after a partial close) is considered a trailing stop. The pseudocode shows 'ModifyStop(entryPrice)', which is a one-time move to break-even, not a continuous trail. Recommend: explicitly state 'BE stop is a one-time move to entry price after partial close; no further stop modification is allowed' to avoid implementer confusion.
- WARNING: The specification requires 'no martingale, no grid expansion, max one position per symbol' (section 3) but does not define what happens if a new entry signal fires while a position is already open. Recommend: add explicit rule such as 'if a new entry signal fires in the same direction as an open position, skip entry; if in opposite direction, close existing position and open new position' or 'if a new entry signal fires, ignore it until the current position is closed'.
- WARNING: The specification mentions 'キャプチャ意図: MIDDLE' and defines TP/SL as equal (1.5ATR each), but does not clarify how the partial close at +1.0ATR interacts with the final TP at +1.5ATR. Specifically: (1) after a 50% partial close at +1.0ATR, does the remaining 50% position still have TP at +1.5ATR (measured from entry price), or is the TP adjusted? (2) if the remaining position hits TP at +1.5ATR, is the exit considered a 'middle capture' or a 'tail chase'? Recommend: clarify that the remaining 50% position after partial close retains the original TP at +1.5*ATR from entry price, and that this is consistent with the 'middle capture' philosophy.
- WARNING: The specification requires backtest 'at least 24 months with the latest 3 months held out' and 'walk-forward setting 4:2' (section on バックテスト合格基準). However, the EA is defined on M15 timeframe with a 15-bar time exit, which means each trade lasts at most ~3.75 hours. Over 24 months, this should generate thousands of trades. The specification also requires 'OOS trade count is below 15 trades per held-out window (minimum 30 total)' as a rejection criterion. For a 4:2 walk-forward on 24 months of data, there would be ~6 held-out windows (2 months each), so 30 total OOS trades is a very low bar. Recommend: clarify whether the 15-trade minimum is per 2-month window or per 1-month window, and backtest to confirm that the strategy generates sufficient trades to meet this threshold.
- WARNING: The specification states 'A profitable strategy must answer "why does this work?" from a stated hypothesis' (section on バックテスト合格基準) but does not provide a clear hypothesis for why the MA cross strategy should work on EURJPY M15 during Asian session. The 'リサーチテーゼ' section mentions 'preserve the source idea' but does not state what the source idea is. Recommend: add explicit hypothesis such as 'MA cross captures mean-reversion in EURJPY during low-liquidity Asian session' or 'MA cross exploits microstructure inefficiency in M15 timeframe' and backtest to confirm that the hypothesis holds in OOS data.
免責事項
本EAは自動生成された検証用コードです。実運用可否はご自身で検証してください。
関連用語¶
- 用語集 - バックテスト
- 用語集 - 勝率
- 用語集 - 逆張り
- 用語集 - スプレッド
- 用語集 - ADX
- 用語集 - SMA
- 用語集 - _Point
- 用語集 - ATR
- 用語集 - RSI
- 用語集 - スリッページ
- 用語集 - pips
- 用語集 - ボラティリティ
- 用語集 - マルチタイムフレーム
- 用語集 - CopyBuffer
- 用語集 - TimeCurrent