Scalp_Event_Reaction_Trending_Moving_Average¶
EA0244_Scalp_Event_Reaction_Trending_Moving_Average_v1.0 / 🧪 候補 — 生成済み・検証待ち
ワンライナー
Scalp Event Reaction Trending Moving Average
判定: ⚫ 散(散る(検証に乗らず))
自律生成EA。エントリー不成立 or 検証未成立で評価対象外。量産の中で淘汰された一体。
自律生成ライン(網羅的に量産)
基本情報¶
| 項目 | 値 | 項目 | 値 | |
|---|---|---|---|---|
| シンボル | AUDUSD | エントリー種別 | event_reaction | |
| 時間足 | M15 | エグジット | fixed_sl | |
| 方向 | both | 主要インジケータ | — |
🧬 DNA 5軸¶
| primary_style | entry_mechanism | regime_target | position_logic | core_indicator_family |
|---|---|---|---|---|
scalp | event_reaction | trending | fixed_sl | moving_average |
📊 バックテスト結果¶
未実行
📝 仕様書 / Specification¶
クリックで展開
リサーチEA仕様書: Scalp Event Reaction Trending Moving Average¶
EA識別情報¶
- EA名: REF0813_09_Scalp_Event_Reaction_Trending_Moving_Average_v1
- 通貨ペア: AUDUSD
- 時間足: M15
- プライマリスタイル: scalp
- エントリーメカニズム: event_reaction
- レジームターゲット: trending
- ポジションロジック: fixed_sl
- コアインジケーター系統: moving_average
- キャプチャ意図: middle (head=新規の頭を取る / middle=頭と尻尾を渡す / tail=枯れ際の反転を取る)
リサーチテーゼ¶
Scalp Event Reaction Trending Moving Average candidate generated from 3 research source(s). The strategy must preserve the source idea while keeping parameters broad enough to survive out-of-sample testing.
根拠ソース¶
- Market Structure Meta
- [TREND] [FILTER] キャリートレード (高金利通貨ロング/低金利通貨ショート) は低ボラ相場で有効、ボラ急拡大時は即損切り必須
- [RISK] [TREND] AUD/JPY・NZD/JPYキャリーは株式市場リスクオン/オフと高相関、株価指数フィルター推奨
- [FILTER] [TREND] 欧州市場オープン (16:00-18:00 JST) はトレンド発生確率が最も高い時間帯
- [SEASONAL] [TREND] 12月はクリスマス休暇による流動性低下でスプレッド拡大、トレンド系は機能しにくい
トレード仕様¶
以下5点は必須です。いずれかが欠落・空欄の場合、この仕様書は不合格としてください。
1. Entry logic(エントリー条件)¶
Event reaction CONTINUATION entry without external news dependency: Detect an event shock from price itself: bar[1] true range > InpShockATR * atr14[2] (default 2.2) and tick volume on bar[1] > 50-bar average volume * InpVolumeMult (default 1.5). BUY continuation: close[1] is in the top 25% of the candle, high[1] exceeds high[2], and SMA50 slope is positive; enter BUY on bar[0] open. SELL continuation: close[1] is in the bottom 25% of the candle, low[1] is below low[2], and SMA50 slope is negative; enter SELL on bar[0] open. Exhaustion guard: skip if wick against the direction is > 50% of candle range. CRITICAL: continuation mode is fixed by this DNA; do not add an input that switches to fade mode. The EA reads market reaction only and must not depend on a calendar API or future news labels.
2. Exit logic(決済条件)¶
Take profit: 1.5R for continuation mode. Stop loss: fixed beyond the shock candle opposite extreme by 0.3*ATR(14). Time exit: close after InpMaxBars (default=6 on H1, 12 on M15) because event momentum decays quickly. Regime exit: if the next two bars fully retrace the entry direction, close immediately. Do not open a second trade from the same shock event.
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(レジームフィルター)¶
Use prior volatility context only: atrSma20[2] > atrSma100[2] * InpVolContextMult (default 1.10), evaluated before the shock candle. The shock candle itself is the entry trigger, not the regime filter.
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
- Minimum ATR activity filter
ロジック独立性要件¶
必須チェック(実装前に確認すること):
- エントリーシグナル変数とレジームフィルター変数は独立したデータ源または独立した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:event_reaction (post-event price reaction 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本が反転方向」 またはピンバー・エンゴルフィングパターン等のローソク足パターン確認に 変更してシグナル品質を向上させる。
- [DIVERSITY-EXPLORE] Targeted an unexplored DNA combination (headroom-directed).
実装ガードレール¶
- [PRIMITIVE-LANE: VERIFIED] Keep creativity in entry/regime/filter logic; use verified execution primitives only.
- [PRIMITIVE-LANE: VERIFIED] Mapped primitives: entry:event_reaction (post-event price reaction 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)
- [TREND] [BREAKOUT] [FILTER] [META] マルチタイムフレームEAでATR等のボラティリティ指標をCopyBufferする際、エントリー判定用の価格・MA(start_pos=1で確定足参照)とATR(start_pos=0で未確定バー参照)でstart_posが混在しやすい。設計方針として「全バッファのstart_posを統一する」か「ATRのみ最新値を使う理由をコメントで明記する」かを決めておくべき。 (.clinerules)
- [TREND] [FILTER] スプレッドリトライパターン(予約エントリーのスプレッド不良時リトライ): 予約フラグ方式でスプレッド不良時に即破棄せず、MAX_SPREAD_RETRY回まで次バーで再試行する設計。リトライカウンターは予約フラグと同時にリセットし、クールダウンや金曜制限等の他条件で予約破棄する際もリセットを忘れないこと。リトライの粒度(ティック単位 vs バー単位)を設計時に明確にすべき。 (.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)
- [STATS] [META] スリッページ許容値(SetDeviationInPoints)はinputパラメータ化することで、バックテストや運用時の調整が容易になる (.clinerules)
- [TREND] [BREAKOUT] [META] [A2] closes[], highs[], lows[]にはArraySetAsSeries(true)が設定されているが、adxValBufferにはArraySetAsSeries設定がない。また、TRBuffer/ATRBuffer/SMABufferはArrayResizeで固定長確保後にArraySetAsSeriesを呼んでいない(ただしこれらは実際にはCopyBufferで使用されていないため実害は限定的)。 (.clinerules)
ストーリーパッケージ¶
- フック: AIが研究メモから自律発掘した「Scalp Event Reaction Trending Moving Average」をEA化して検証。
- ブログアングル: 研究アイデアは本当にMT5で再現できるのか、OOSで崩れるかまで公開する。
- 失敗アングル: 失敗時は NO_TRADE / LOW_SAMPLE / OVERFIT / HIGH_DD に分類して次の研究候補へ進む。
Spec Validation Warnings (auto-generated)¶
- CONTRADICTION: Entry logic specifies event shock detection (bar[1] true range > InpShockATR * atr14[2]) combined with volume confirmation, followed by continuation entry (close[1] in top/bottom 25%, high[1] > high[2] or low[1] < low[2], SMA50 slope positive/negative). However, Regime filter requires atrSma20[2] > atrSma100[2] * InpVolContextMult evaluated BEFORE the shock candle. The shock candle (bar[1]) is the entry trigger itself. If the regime filter is evaluated on bar[2] data and the shock occurs on bar[1], the regime context may have already shifted by the time entry is triggered on bar[0]. More critically: the entry logic states 'enter BUY on bar[0] open' but the shock detection uses bar[1] data. If regime filter fails on bar[2] but shock appears on bar[1], entry is blocked. Conversely, if regime passes on bar[2] but shock does not occur on bar[1], no entry signal exists. The temporal alignment between 'prior volatility context' (bar[2]) and 'shock candle' (bar[1]) is not explicitly synchronized, creating a window where both conditions cannot reliably fire together.
- Fix: Clarify temporal precedence: (1) If regime filter must pass on bar[2], explicitly state that shock detection on bar[1] is conditional on bar[2] regime passing, OR (2) Move regime evaluation to bar[1] to align with shock detection, OR (3) Separate regime confirmation into a distinct bar (e.g., regime on bar[2], shock on bar[1], entry on bar[0]) with explicit sequencing in pseudocode. Current spec leaves ambiguity on whether both conditions can fire in the same entry sequence.
- CONTRADICTION: Exit Discipline (section 2.5) specifies TP = 1.5ATR and SL = 1.5ATR with partial close at +1.0ATR (50% position, remainder to breakeven). Exit logic (section 2) specifies 'Take profit: 1.5R for continuation mode' and 'Stop loss: fixed beyond the shock candle opposite extreme by 0.3ATR(14)'. These two SL definitions are contradictory: Exit Discipline mandates SL = 1.5ATR, but Exit logic specifies SL = 0.3ATR beyond shock extreme. If shock candle ATR is large, 0.3ATR may be much smaller than 1.5ATR, creating two incompatible SL levels. The spec states 'Exit Discipline を優先' (prioritize Exit Discipline), but this creates implementation ambiguity: which SL value is actually used? If 1.5ATR is used, the 0.3ATR rule is ignored. If 0.3*ATR is used, the Exit Discipline is violated. This contradiction must be resolved before coding.
- Fix: Explicitly choose one SL definition and remove the other. If Exit Discipline is authoritative, delete the '0.3ATR beyond shock extreme' rule from section 2. If the shock-relative SL is intentional, rewrite Exit Discipline to match. Recommend: use Exit Discipline (1.5ATR) as the primary rule, and document shock-relative SL as a secondary validation (e.g., 'SL must not be tighter than 0.3*ATR from shock extreme') rather than a competing definition.
- WARNING: Entry logic requires SMA50 slope to be positive (BUY) or negative (SELL) evaluated on bar[1]. Regime filter uses atrSma20[2] > atrSma100[2] * InpVolContextMult, which is a volatility regime, not a trend regime. The spec does not explicitly state whether SMA50 slope direction must align with the volatility regime direction. If volatility regime is bullish (atrSma20[2] > atrSma100[2]) but SMA50 slope is negative, the entry logic would trigger a SELL (negative slope) while the regime filter passes (high volatility). This is not a logical contradiction per se, but it creates a semantic mismatch: the regime filter is volatility-based, not trend-based, yet the entry signal is trend-based (SMA50 slope). The spec states 'Use prior volatility context only' for the regime filter, implying volatility is the filter, not trend direction. However, the entry logic's SMA50 slope is a trend signal. If both fire independently, the EA may enter counter-trend trades during high-volatility regimes, which contradicts the stated intent of 'trending' regime target. This is a design inconsistency rather than a logical impossibility, but it risks unintended behavior.
- Fix: Clarify the relationship between volatility regime and trend direction. Option 1: Add an explicit trend filter (e.g., 'SMA50 > SMA200 for BUY regime') to align entry trend with regime trend. Option 2: Document that volatility regime is independent of trend direction, and the EA intentionally trades counter-trend during high-volatility windows (contrarian strategy). Option 3: Redefine regime filter to include trend direction (e.g., 'atrSma20[2] > atrSma100[2] AND SMA50[2] > SMA200[2]'). Current spec leaves this ambiguous.
- WARNING: Source Evidence section cites '[FILTER] [TREND] 欧州市場オープン (16:00-18:00 JST) はトレンド発生確率が最も高い時間帯' (European market open 16:00-18:00 JST has highest trend probability) and '[SEASONAL] [TREND] 12月はクリスマス休暇による流動性低下でスプレッド拡大、トレンド系は機能しにくい' (December has low liquidity and wide spreads, trend strategies underperform). However, the Filters section lists only 'Spread and session filter', 'Regime-specific confirmation filter from source evidence', 'Minimum sample count filter', and 'Minimum ATR activity filter'. No explicit time-of-day filter (16:00-18:00 JST) or December exclusion filter is defined in the Entry logic or Exit logic sections. The spec does not state whether the EA should trade only during 16:00-18:00 JST or avoid December entirely. This is a gap between Source Evidence and implementation, not a logical contradiction, but it represents incomplete specification.
- Fix: Add explicit filters to Entry logic or Filters section: (1) Time-of-day filter: 'Only enter during 16:00-18:00 JST (or equivalent in broker timezone)' OR document why this filter is omitted. (2) Calendar filter: 'Skip trading in December' OR document why December is not excluded. If these filters are intentionally omitted, add a note explaining the rationale (e.g., 'Source evidence is noted but not implemented to maximize sample size for OOS testing').
- WARNING: Exit Discipline specifies 'Partial close at +1.0ATR with BE stop' but does not define the exact sequence: (1) Is the 50% close executed immediately when favorable excursion >= 1.0ATR, or (2) Is it queued and executed on the next bar? The pseudocode shows 'return; // wait for refreshed position state' after partial close, implying a delay. Clarify whether partial close is market order on current bar or pending order on next bar.
- WARNING: Entry logic states 'Exhaustion guard: skip if wick against the direction is > 50% of candle range.' This is a filter, but it is not listed in the Filters section. Confirm whether this guard is mandatory or optional, and whether it applies to both BUY and SELL entries.
- WARNING: Regime filter uses atrSma20[2] and atrSma100[2], but the Entry logic uses atr14[2] for shock detection. Two different ATR periods (20 and 14) are used. Confirm whether this is intentional (volatility regime uses longer period, shock uses shorter period) or a specification error.
- WARNING: Entry logic specifies 'Do not open a second trade from the same shock event' but does not define 'same shock event'. Is this per-bar (no two entries on bar[1] and bar[0] from the same shock), per-symbol (no overlapping positions), or per-session? Clarify to avoid ambiguous implementation.
- WARNING: Time exit is specified as 'InpMaxBars (default=6 on H1, 12 on M15)' in section 2, but Exit Discipline specifies '15 bars' in section 2.5. These are contradictory: 12 bars vs. 15 bars for M15 timeframe. Exit Discipline states it takes priority, so 15 bars should be used, but this creates a discrepancy with the default parameter. Recommend: set InpMaxBars default to 15 for M15 and document the change.
- WARNING: Regime filter is evaluated 'before the shock candle' (bar[2] data), but the spec does not state whether the regime filter must remain true throughout the entry sequence (bar[2] → bar[1] → bar[0]) or only at the initial check. If regime flips between bar[2] and bar[0], is the entry still valid? Clarify regime filter persistence.
- WARNING: The spec forbids 'external news dependency' and 'calendar API or future news labels' but does not define how the EA detects 'event shock' without news. The shock is inferred from 'true range > InpShockATR * atr14[2]' and 'volume > 50-bar average * InpVolumeMult', which are price/volume anomalies, not news events. Confirm that this price-based shock detection is the intended mechanism and that no external news feed is required.
- WARNING: Partial close logic states 'close 50% of position at +1.0 * atrAtEntry favorable excursion' and 'move BE stop only after refreshed position state on a later tick/new bar'. This implies the remaining 50% position is held with a breakeven stop. However, the original SL is 1.5ATR. If the position moves +1.0ATR and 50% is closed, the remaining 50% has SL moved to breakeven, but the original TP (1.5ATR) is still active. This creates an asymmetric exit: 50% closes at +1.0ATR, 50% has SL at breakeven but TP at 1.5ATR. Confirm whether the remaining 50% TP is still 1.5ATR or adjusted to a new level.
- WARNING: The spec states 'キャプチャ意図: MIDDLE — Middle capture: give up the head and the tail.' This implies the EA should not chase the full move. However, the TP is 1.5ATR and SL is 1.5ATR, creating a 1:1 risk-reward ratio. For a 'middle capture' strategy, a 1:1 RR is reasonable, but the spec does not justify why 1.5ATR is the 'middle' and not, e.g., 1.0ATR or 2.0ATR. Recommend: add a rationale for the 1.5ATR choice based on historical shock candle analysis.
- WARNING: Backtest合格基準 states 'Reject if OOS trade count is below 15 trades per held-out window (minimum 30 total)'. For M15 timeframe on AUDUSD over 24 months, this is a low bar (30 trades in 24 months = ~1.25 trades/month). Confirm whether this threshold is appropriate for a scalping strategy on M15, or whether it should be higher (e.g., 100+ trades).
- WARNING: The spec lists 'Primitive Execution Lane: VERIFIED' with 'entry:event_reaction' and 'position:fixed_sl' as verified primitives. However, the partial close logic (50% at +1.0*ATR, remainder to BE) is not a standard 'fixed_sl' primitive; it is a custom exit refinement. Confirm whether this partial close logic is considered part of the 'fixed_sl' primitive or a separate experimental feature that requires additional validation.
免責事項
本EAは自動生成された検証用コードです。実運用可否はご自身で検証してください。
関連用語¶
- 用語集 - バックテスト
- 用語集 - スプレッド
- 用語集 - ATR
- 用語集 - SMA
- 用語集 - RSI
- 用語集 - 勝率
- 用語集 - スリッページ
- 用語集 - pips
- 用語集 - ボラティリティ
- 用語集 - ADX
- 用語集 - マルチタイムフレーム
- 用語集 - CopyBuffer
- 用語集 - ArraySetAsSeries
- 用語集 - ArrayResize