Commit graph

2 commits

Author SHA1 Message Date
AnimateDread
e6ff2506a8 refactor(Money): extract CMoneyRiskBase to remove FixedRisk/Intelligent duplication
CMoneyFixedRisk and CMoneyIntelligent both derived independently from
CExpertMoneyCustom and carried near-identical CalculatePotentialLoss()/
CheckOpenLong()/CheckOpenShort()/CalculateLotSize() bodies, maintained
in two places. New Money/MoneyRiskBase.mqh (CMoneyRiskBase) houses the
shared core, with two virtual hooks - AdjustRiskAmount()/AdjustLotSize()
- at the exact two points CMoneyIntelligent's confidence-scaling and
trade-history Optimize() step used to diverge. CMoneyFixedRisk now has
an empty body (the base's defaults are exactly its old behavior);
CMoneyIntelligent overrides only the two hooks. CMoneyFixedLot is
untouched - it doesn't do risk-based sizing.

Pure reorganization, no behavior change; compiled clean (MetaEditor,
0 errors/0 warnings).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 15:53:04 -04:00
super.admin
0a527b0cf9 convert 2025-05-30 16:35:54 +02:00