mql5/Experts/Advisors/Modules
darashikoh 56209c4d63 Summary of Fixes
The "Stop distance must be greater than 0" error is caused by a chain of issues in the ATR calculation. Here's what you need to do:
1. Replace the GetValidATR function in EntrySystem.mqh
The original code had a recursive call bug. Replace the entire EntrySystem.mqh file with the fixed version I provided above.
2. Update the GetATR method in TechnicalAnalysis.mqh
Replace the GetATR method with the fixed version that includes fallback calculations.
3. Update the AnalyzeMarket method in TechnicalAnalysis.mqh
Replace the AnalyzeMarket method with the enhanced version that ensures volatility is always valid.
4. Update the main EA file (ERMT_6.0.mq5)
Replace the CheckEntrySignals() and UpdateMarketConditions() functions with the enhanced versions that include debugging and validation.
Key Changes Made:

Fixed Recursive Bug: The GetValidATR function was calling itself instead of using market.volatility
Added Multiple Fallbacks:

Primary: Use market.volatility from TechnicalAnalysis
2025-07-30 19:33:01 +01:00
..
Dashboard.mqh Summary of Changes to Fix Zero Stop Distance Error 2025-07-30 13:32:29 +01:00
DataTypes.mqh Summary of Changes to Fix Zero Stop Distance Error 2025-07-30 13:32:29 +01:00
EntrySystem.mqh Summary of Fixes 2025-07-30 19:33:01 +01:00
RiskManager.mqh Summary of Changes to Fix Zero Stop Distance Error 2025-07-30 13:32:29 +01:00
TechnicalAnalysis.mqh Summary of Fixes 2025-07-30 19:33:01 +01:00
TradeManager.mqh 1 - Backtest for 1.5 years EURUSD M5 - no trades initia; Critical error on exitlised 2025-07-20 22:38:24 +01:00
Utilities.mqh The Problem: In MT5's Strategy Tester environment, file operations are restricted for security reasons. The backtest runs in a sandboxed environment where file creation/writing may be blocked or redirected to a different location. 2025-07-30 14:26:35 +01:00