Skip to content

fix: preserve residual long after repeated percent sell entry - #202

Merged
luisleo526 merged 2 commits into
mainfrom
round18/replaced-percent-short
Sep 6, 2026
Merged

fix: preserve residual long after repeated percent sell entry#202
luisleo526 merged 2 commits into
mainfrom
round18/replaced-percent-short

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

Repeating a default-percent short entry with the same ID in one bar could close the entire existing long and open a new short. For the confirmed ordinary next-open case, the engine now executes the frozen sell quantity, preserves any long remainder and its bracket lifecycle, and cancels later sell siblings. Exact replacement provenance and risk-direction guards preserve the other order paths.

Validated on engine c022c40ebca11fd73a087b563c30fb813046fbe8 with codegen 3fd97fe28abd7b191cb376d9f5db4e056fcfae4b:

  • Cloud Run measured all 4,190 probes in 72/72 cases. Jevon XAUUSD moves from strong to excellent, count difference 2 to 0; all 260 target entry/exit rows match TradingView on side, time, price and quantity. The other 4,189 canonical results are unchanged, with zero regressions, errors, gaps or new moderate results.
  • Gate pineforge-pr-gate-hvgzv: PASS, target score +1, and zero regressions or tolerated exceptions across 704 hard probes. Result: 4,159 excellent / 30 strong / 1 moderate.
  • Fresh build and 212/212 tests passed, including 95 focused checks. Eleven covered TradingView controls establish the behavior and its directional boundary. Independent Grok 4.6 review of this exact candidate is GREEN, P0/P1/P2 = 0; all prior review findings are resolved.

Grading metrics, thresholds, tolerances, verifier, harness, tapes and population are unchanged. The buy-side replacement behavior remains outside this repair.

Candidate snapshot: 0b80b0726dea11aa41fb4b1adf828c527f6a2694f8733aff1c0c3fff0bf017e9 (788,862 bytes).

@luisleo526
luisleo526 merged commit c022c40 into main Sep 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant