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
48 lignes
1,4 Kio
Text
48 lignes
1,4 Kio
Text
## Streamlined Dashboard Summary
|
|
|
|
The v1.3 dashboard has been streamlined to remove redundant features:
|
|
|
|
### **Removed Sections:**
|
|
1. ❌ **Breakevens counter** - USE_BREAKEVEN_SYSTEM is disabled in v1.3
|
|
2. ❌ **Performance section** (Saved/Captured/Efficiency) - Redundant with v1.3 metrics
|
|
3. ❌ **Position Phases** (6 individual phase counts) - Too detailed
|
|
4. ❌ **Profit Locks** section (Min Locked/Active Locks) - Now handled by phase floors
|
|
|
|
### **Streamlined Dashboard (21 objects, down from 42):**
|
|
|
|
```
|
|
ERMT PME v1.3
|
|
────────────────────
|
|
STATUS
|
|
Active: X
|
|
Closed: X
|
|
|
|
RISK
|
|
Exposure: X.XX
|
|
Drawdown: X.X%
|
|
|
|
MANAGEMENT
|
|
Trails: X
|
|
Partials: X
|
|
Runners: X
|
|
|
|
V1.3 SOLUTIONS
|
|
S1-Floors: Active [GREEN]
|
|
S2-Dynamic: Enabled [GREEN]
|
|
S3-ATR: Off [GRAY]
|
|
Premature: X.X% [GREEN/YELLOW/RED]
|
|
Avg Profit: Xpts [GREEN/YELLOW/WHITE]
|
|
```
|
|
|
|
### **Height Reduction:**
|
|
- Background: 400px → 280px (30% smaller)
|
|
- Objects: 42 → 21 (50% reduction)
|
|
- Cleaner, more focused on v1.3 essentials
|
|
|
|
### **Key Improvements:**
|
|
✅ Removed disabled features (breakevens)
|
|
✅ Eliminated redundant performance metrics
|
|
✅ Consolidated runner tracking (one line instead of detailed phase breakdown)
|
|
✅ Focus on v1.3 solutions which are the primary value proposition
|
|
✅ Faster rendering with fewer objects
|
|
✅ Easier to read at a glance
|