mql5/Logs/20260226.log
darashikoh 428fd88c60 feat(M5): Implement v2.1 config enforcement and graduated stops in M5 contrarian mode
BREAKING CHANGES:
- M5 mode now enforces all v2.1 delayed BE/trailing parameters
- Graduated stop system replaces legacy disaster stop when enabled
- Max bars limit now triggers hard position close

Changes to PositionManager_PME_Complete.mqh:

1. Max Bars Hard Close Enforcement
   - Added check for m_m5_config.max_bars at start of ApplyM5ContrarianManagement()
   - Forces EXIT_TIME close when position age exceeds configured limit (300 bars)
   - Prevents indefinite position holding in extended phases

2. Graduated Stop-Loss System
   - Implements ATR-based phase-progressive stops:
     * Phase 1 (0-60 bars): 3.5 ATR wide initial protection
     * Phase 2 (60-180 bars): 2.5 ATR tightened stop
     * Phase 3 (180+ bars): 2.0 ATR mature stop
   - Replaces legacy disaster stop when m_config.use_graduated_stops enabled
   - Falls back to disaster stop (150pt @ -100pt) if graduated stops disabled
   - Updates m_positions[].current_sl after successful modification

3. Delayed Breakeven Enforcement (v2.1)
   - Respects m_config.breakeven_min_bars (20 bars minimum age)
   - Respects m_config.breakeven_min_profit_bars (5 consecutive profit bars)
   - Applied to both Phase 1 fast BE (25pts) and Phase 2 maturity BE (30pts)
   - Logs bar count and consecutive profit bars on activation

4. Delayed Trailing Enforcement (v2.1)
   - Respects m_config.trail_min_bars (40 bars minimum age)
   - Applied to percentage trail in Phase 2 (30%/40% based on reversal speed)
   - Sets trail_activated flag and increments m_metrics.trails_activated
   - Logs activation with percentage and bar count

5. M5 Trailing Helper Metric Sync
   - Created ApplyM5PercentageTrail() with current_sl sync
   - Created ApplyM5PointsTrail() with current_sl sync
   - Created ApplyM5DynamicTrail() with current_sl sync
   - Standard helpers (ApplyPercentageTrail, etc.) preserved for non-M5 use
   - M5 contrarian management now calls M5-specific versions exclusively
   - Fixes metric/state desync between MT5 server and in-memory position tracking

Architecture:
- M5 mode continues to bypass standard management path (intentional isolation)
- Standard trailing/technical/time-exit engines remain unused in M5 mode
- Configuration separation maintained: ManagementConfig for standard + v2.1 fields, M5Config for contrarian-specific
- No changes to main EA file (ERMT_PME_2.1_M5.mq5)

Compatibility:
- No breaking changes to standard (non-M5) management path
- Existing M5 backtest results remain valid (behavior refinement only)
- All v2.1 configuration fields now honored in M5 runtime
2026-03-02 17:08:42 +00:00

69 lines
17 KiB
Text

RQ 0 10:42:12.875 BW-ZoneTrade (NZDUSD,M5) Not all data of ExtACHandle is calculated (33981 bars). Error 0
HD 0 10:42:14.216 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
ND 0 10:45:00.063 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
GD 0 10:50:00.956 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
QE 0 10:55:00.191 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
EE 0 11:00:00.198 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
KE 0 11:05:00.146 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
MJ 0 11:05:00.863 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
GJ 0 11:05:06.168 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
JJ 0 11:10:01.188 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
GJ 0 11:10:03.013 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
NJ 0 11:15:00.270 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
QJ 0 11:15:04.723 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
LE 0 11:30:00.268 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
HE 0 11:30:02.701 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
QE 0 11:35:00.691 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
PE 0 11:35:04.638 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
DJ 0 11:55:01.790 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
DJ 0 12:15:00.028 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
PD 0 13:48:17.690 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
PE 0 13:48:17.737 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
JK 0 13:48:17.814 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
QK 0 13:50:00.191 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
ME 0 14:08:12.938 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
FJ 0 14:08:13.042 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
DE 0 14:55:00.127 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
IJ 0 14:55:00.214 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
GE 0 15:05:00.214 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
GJ 0 15:10:00.034 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
ME 0 15:10:03.981 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
IE 0 15:15:00.644 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
OE 0 15:20:00.079 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
PD 0 15:32:33.707 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
PD 0 15:32:33.712 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
EK 0 15:32:33.733 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
JJ 0 15:50:00.293 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
MK 0 15:50:31.836 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
PK 0 16:02:03.191 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
MK 0 16:18:44.235 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
CE 0 16:18:46.028 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
KE 0 16:19:04.742 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
RJ 0 16:20:00.206 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
FE 0 16:20:00.406 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
MD 0 16:45:56.447 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
FK 0 17:04:10.455 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
QD 0 17:19:49.632 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
NE 0 17:20:00.292 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
LJ 0 17:36:36.656 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market sell 0.10 USDJPY [auto trading disabled by client]
IE 0 17:52:43.808 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
CE 0 18:01:40.991 Galileo FX_Pro_MT5 (GBPUSD,H1) CTrade::OrderSend: market buy 0.10 GBPUSD [auto trading disabled by client]
QJ 0 18:05:27.667 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
KJ 0 18:23:06.145 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
GJ 0 18:40:35.319 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
QE 0 19:05:47.453 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]
NJ 0 19:05:56.131 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
KJ 0 19:10:00.269 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
CJ 0 19:10:01.301 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
QK 0 21:00:45.159 Galileo FX_Pro_MT5 (GBPUSD,H1) CTrade::OrderSend: market sell 0.10 GBPUSD [auto trading disabled by client]
HE 0 21:17:46.224 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
DE 0 21:23:34.666 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
RE 0 21:25:06.333 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market buy 0.10 NZDUSD [auto trading disabled by client]
DE 0 21:31:16.379 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market buy 0.10 EURUSD.r [auto trading disabled by client]
KJ 0 22:33:43.631 Galileo FX_Pro_MT5 (AUDUSD,D1) CTrade::OrderSend: market sell 0.10 AUDUSD [auto trading disabled by client]
DI 2 22:44:06.344 QQE (NZDUSD,M5) indicator is too slow, 622720 ms. rewrite the indicator, please
KF 0 23:23:00.332 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
MF 0 23:23:14.250 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
LF 0 23:44:57.141 Galileo FX_Pro_MT5 (EURUSD.r,M5) CTrade::OrderSend: market sell 0.10 EURUSD.r [auto trading disabled by client]
FG 0 23:44:57.141 Galileo FX_Pro_MT5 (NZDUSD,M5) CTrade::OrderSend: market sell 0.10 NZDUSD [auto trading disabled by client]
FH 0 23:44:59.150 Galileo FX_Pro_MT5 (USDJPY,M5) CTrade::OrderSend: market buy 0.10 USDJPY [auto trading disabled by client]