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
24 lines
1.3 KiB
INI
24 lines
1.3 KiB
INI
;Genetic optimization: ExpertMAPSAR, EURUSD M5, real ticks, 2026.01.05 - 2026.03.02
|
|
[Tester]
|
|
Expert=Advisors\ExpertMAPSAR.ex5
|
|
Symbol=EURUSD
|
|
Period=M5
|
|
Optimization=2
|
|
Model=4
|
|
FromDate=2026.01.05
|
|
ToDate=2026.03.02
|
|
ForwardMode=0
|
|
Deposit=1000
|
|
Currency=USD
|
|
ProfitInPips=1
|
|
Leverage=100
|
|
ExecutionMode=-1
|
|
OptimizationCriterion=0
|
|
[TesterInputs]
|
|
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
|