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 |
||
---|---|---|
.. | ||
Dashboard.mqh | ||
DataTypes.mqh | ||
EntrySystem.mqh | ||
RiskManager.mqh | ||
TechnicalAnalysis.mqh | ||
TradeManager.mqh | ||
Utilities.mqh |