CRITICAL FIX: - MoveToBreakeven() now validates against broker stop level before modification - Prevents "Invalid stops" error causing infinite retry spam - Marks breakeven_applied=true even on failed modify to stop retries RELATED FIXES: - Disabled analyzer cleanup in OnDeinit to prevent error 506 pointer access crash - Analyzer GenerateAnalysisReport() file I/O unsafe during shutdown - TODO: Refactor analyzer report generation to be shutdown-safe Changes to PositionManager_PME_Complete.mqh: - Lines 854-876: Added ValidateStopLoss() check in MoveToBreakeven() - Failsafe: Mark BE attempted even if modify fails post-validation - Prevents tick-spam when BE trigger met but SL too close to market price Changes to ERMT_PME_2.1_M5.mq5: - Lines 893-906: Commented out g_analyzer cleanup block in OnDeinit() - Temporary disable pending shutdown-safe refactor Testing: - Before: "failed modify #7... [Invalid stops]" spam, backtest hangs - After: Clean execution, BE either succeeds or silently skips - Parametric optimization now completes successfully Dependencies: Requires M5 v2.1 changes from previous commit
60 lines
2.5 KiB
Text
60 lines
2.5 KiB
Text
=== PME Log Started ===
|
|
Instance: PME2
|
|
Session Start: 2026.03.03 11:12
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Risk Manager initialized - Max Loss: 3.0%, Daily Loss: 10.0%, Max DD: 25.0%
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Technical Analysis initialized successfully
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] PositionManager initialized: 0 positions found
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Breakeven system: DISABLED (using phase-based profit locking)
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Phase-based profit locking: ENABLED
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Partial closures: ENABLED
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] === PME Configuration ===
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Magic Filter: 0
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Management Mode: BE & Trail
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Max Loss/Trade: 3.00%
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Max Daily Loss: 10.00%
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Max Drawdown: 25.00%
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Breakeven: Enabled @ 150 points
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Trailing: ATR
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Partial Close: Enabled
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] Start Balance: 100000.00
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] ========================
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] PME initialized successfully - 0 positions detected
|
|
[2026.03.03 11:12:38] [PME2] [INFO ] PME [#0] M5 Config - Partials: 35/60/100/150, Phases: 60/180/300, Disaster: 100/150
|
|
[2026.03.03 11:12:53] [PME2] [INFO ] PME Shutdown: Chart changed
|
|
[2026.03.03 11:12:53] [PME2] [INFO ]
|
|
==================================================
|
|
ERMT PME - Final Session Report
|
|
==================================================
|
|
Session Duration: 0.0 hours
|
|
Starting Balance: $100000.00
|
|
Final Balance: $100000.00
|
|
Session P/L: $0.00 (0.00%)
|
|
|
|
--- Management Statistics ---
|
|
Positions Managed: 0
|
|
Positions Closed: 0
|
|
Emergency Closes: 0
|
|
|
|
--- Actions Taken ---
|
|
Stops Added: 0
|
|
Stops Adjusted: 0
|
|
Breakevens Applied: 0
|
|
Trails Activated: 0
|
|
Partial Closes: 0
|
|
Total Actions: 0
|
|
|
|
--- Performance Metrics ---
|
|
Loss Prevented: $0.00
|
|
Profit Captured: $0.00
|
|
Total Value Added: $0.00
|
|
Management Efficiency: 0.00%
|
|
Success Rate: 0.00%
|
|
|
|
--- Risk Metrics ---
|
|
Risk Reduced: $0.00
|
|
Avg Risk Reduction: 0.00%
|
|
Max Single Risk: $0.00
|
|
Final Exposure: $0.00
|
|
==================================================
|
|
|
|
[2026.03.03 11:12:53] [PME2] [ERROR] Failed to open file for writing: PME_FinalReport_2026_PME2.03.03 11:12.txt
|