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
10 lines
924 B
Text
10 lines
924 B
Text
; saved automatically on 2026.03.03 09:55:44
|
|
; this file contains last used input parameters for testing/optimizing ExpertMAPSAR expert advisor
|
|
;
|
|
Inp_Expert_Title=ExpertMAPSAR
|
|
Inp_Signal_MA_Period=12||12||1||24||Y
|
|
Inp_Signal_MA_Shift=6||6||1||60||N
|
|
Inp_Signal_MA_Method=0||0||0||3||N
|
|
Inp_Signal_MA_Applied=1||1||0||7||N
|
|
Inp_Trailing_ParabolicSAR_Step=0.02||0.02||0.002000||0.200000||N
|
|
Inp_Trailing_ParabolicSAR_Maximum=0.2||0.2||0.020000||2.000000||N
|