mql5/Profiles/Tester/Contrarian_M5_Optimised.ini
darashikoh a8611dc48d fix: resolve M5 parameter conflicts and align config with user inputs
CHANGES:
- InitializeM5BarCountingMode(): Replace hardcoded boolean overrides with
  input-driven values (InpBreakevenEnabled, InpPartialEnabled,
  InpTrailingMethod, InpTrailDistance, InpTrailStep, InpAdaptiveTrailing)
- ConfigureContrarianMode(): Update preset to respect global inputs instead
  of hardcoded values
- ApplyM5ContrarianManagement() - Phase 1: Add m_config.breakeven_enabled
  check before executing BE
- ApplyM5ContrarianManagement() - Phase 2: Add m_config.breakeven_enabled
  check and wrap partials in if(m_config.partial_enabled) block
- Remove undeclared config.use_technical_exits field reference

BEHAVIOR:
- M5 mode now respects global enable/disable flags set in EA inputs
- Delayed breakeven and trailing delays preserved (InpMinBarsBeforeBE,
  InpMinBarsBeforeTrail remain M5-specific)
- Graduated stop-loss (3.5→2.5→2.0 ATR) and phase-based management unchanged
- Test reports now accurately reflect enabled/disabled features

FIXES:
- Configuration now matches tester report flags
- User can disable BE or partials in M5 mode via global inputs
- Prevents undefined behavior from conflicting hardcoded vs input values
2026-03-04 16:04:16 +00:00

116 lines
5.3 KiB
INI

[Tester]
Expert=Advisors\ERMT_PMEx\ERMT_PME_2.1_M5.ex5
Symbol=EURUSD
Period=M5
Optimization=0
Model=0
FromDate=2026.01.05
ToDate=2026.03.02
ForwardMode=0
Deposit=1000
Currency=USD
ProfitInPips=1
Leverage=100
ExecutionMode=-1
OptimizationCriterion=0
Visual=0
[TesterInputs]
; === Management Control ===
InpInstanceID=PME2_Baseline
InpManageAllPositions=true
InpMagicFilter=0
InpDefaultMode=3
InpStartLevel=1
; === Entry Mode (Backtesting) ===
InpEnableEntries=true
InpEntryMagic=77777
InpEntryRiskPercent=1.0
InpEntryLots=0.0
InpStopLossPoints=300
InpTakeProfitRR=1.5
InpMinBarsBetweenEntries=24
; === Risk Protection ===
InpMaxLossPerTrade=3.0
InpMaxDailyLoss=10.0
InpMaxDrawdown=25.0
InpMaxCorrelation=0.8
; === Emergency Protection ===
InpApplyEmergencyStops=false
InpEmergencySLMultiplier=7.0
InpEmergencyTPMultiplier=4.0
; === Stop Loss Management ===
InpDynamicStops=false
InpTightenOnProfit=false
InpTightenThreshold=50.0
InpProtectProfits=true
; === Breakeven Settings ===
InpBreakevenEnabled=true
InpBreakevenTrigger=150.0
InpBreakevenOffset=50.0
InpMultiLevelBE=false
; === Trailing Stop ===
InpTrailingMethod=0
InpTrailStart=50.0
InpTrailDistance=30.0
InpTrailStep=10.0
InpAdaptiveTrailing=true
; === Partial Close ===
InpPartialEnabled=true
InpPartialTrigger1=50.0
InpPartialPercent1=30.0
InpPartialTrigger2=100.0
InpPartialPercent2=25.0
; === Exit Management ===
InpUseTechnicalExits=false
InpTimeBasedExits=false
InpMaxBarsInTrade=500
InpReduceRiskOverTime=false
; === Time Filters ===
InpUseTimeFilter=false
InpStartHour=8
InpEndHour=20
InpFridayClose=true
InpFridayCloseHour=21
; === Display Settings ===
InpShowDashboard=true
InpDashboardX=20
InpDashboardY=50
InpUpdateFrequency=2
; === System Settings ===
InpLogLevel=3
InpSaveReports=true
InpEmailAlerts=false
InpPushAlerts=false
InpSoundAlerts=false
; === M5 Bar Counting Mode ===
InpEnableM5Mode=true
InpM5Partial1=35.0
InpM5Partial2=60.0
InpM5Partial3=100.0
InpM5Partial4=150.0
InpM5Phase1=60
InpM5Phase2=180
InpM5MaxBars=300
InpM5DisasterTrigger=100.0
InpM5DisasterDistance=150.0
InpBarCountEntry=7
; === Graduated Stop-Loss (v2.1) ===
InpUseGraduatedStops=true
InpInitialStopATR=3.5
InpPhase1StopATR=2.5
InpPhase2StopATR=2.0
InpMatureStopATR=1.5
; === Delayed Breakeven (v2.1) ===
InpUseDelayedBreakeven=true
InpMinBarsBeforeBE=20
InpMinProfitBarsForBE=5
InpRequireProfitStability=true
; === Delayed Trailing (v2.1) ===
InpUseDelayedTrailing=false
InpMinBarsBeforeTrail=40
InpTrailMinProfit=60.0
; === Reversal Speed Tracking (v2.1) ===
InpShowReversalMetrics=true
InpAdjustForReversalSpeed=true
InpFastReversalBars=12
InpSlowReversalBars=60