EA correctness fixes + group-state persistence (removes roadmap, executes it)#12
Merged
Conversation
…nfig Executes the audited bug list directly (roadmap doc removed): - MaxSpreadPips is now enforced: reject new orders when the live spread exceeds it (0 disables). Pip = 10 points on 5/3-digit symbols, 1 point otherwise. - MaxPositions now counts open positions AND pending orders (default raised 10 -> 50), so a burst of pending split orders can't blow past the cap. - Daily-loss window follows broker midnight (iTime D1) instead of the server's UTC day, so offset-timezone brokers reset at the right moment. - partial_close_percent removed from the API model, command dict, and config (it was forwarded to the EA and ignored end to end). - Split-group state is persisted to MQL5/Files/split_groups_<magic>_<login>.csv on every change and reloaded on restart, reconciled against live orders. This restores the real level count and survives brokers that rewrite comments; comment-based recovery remains the fallback when no state file exists. Also fixes a genuinely flaky test: the envelope-correlation test used a caller timeout (5s) shorter than the fake-EA serve deadline (8s), so a transient scheduling hiccup abandoned a command permanently and failed the assertion. Callers now outlast the serve window. Verified: MetaEditor compile 0 errors/0 warnings (Wine /portable); 12/12 tests pass (correlation test 6/6 across reruns). Runtime behavior still needs a demo-account pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executes the audited bug list directly and removes the roadmap doc.
EA / API fixes
iTimeD1), not the server's UTC day.MQL5/Files/split_groups_<magic>_<login>.csv) on every change, reloaded and reconciled against live orders on restart — survives broker comment rewrites and restores the real level count. Comment-based recovery stays as the fallback.Also
Verification
🤖 Generated with Claude Code