Commit graph Vizion-Trading-EA/Utilities.mqh
Author SHA1 Message Date
SahrJohn
8f7d94ef58 fix: margin-aware lot sizing and broker stops-level clamping
- NormalizeLots: derive rounding digits from SYMBOL_VOLUME_STEP instead of
  hardcoded 2, floor onto the step grid before clamping to min/max
- FitLotsToMargin: shrink volume to fit 90% of free margin via
  OrderCalcMargin; skip the trade when even VOLUME_MIN cannot be afforded
  (fixes repeated 'not enough money' rejects on XAUUSD)
- GetSLPoints/GetTPPoints: clamp to SYMBOL_TRADE_STOPS_LEVEL + spread
  (fixes repeated 'invalid stops' rejects on GBPUSD counter trades)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 16:19:12 -05:00
b72c361693 Fix MT5 compile issues and update build output 2026-02-19 20:05:27 +00:00
f6bead226f Sync from vizion-trading infra/mt5/ea_local 2026-02-15 05:13:55 +00:00