Skip to content

fix: preserve strategy close-all arguments#63

Merged
luisleo526 merged 1 commit into
mainfrom
codex/close-all-arguments
Jul 16, 2026
Merged

fix: preserve strategy close-all arguments#63
luisleo526 merged 1 commit into
mainfrom
codex/close-all-arguments

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Outcome

Preserve Pine strategy.close_all comment and immediately arguments instead of lowering every call to a no-argument close. Also correct the official positional order shared by strategy.close and strategy.close_all.

Implementation

  • close: alert_message, immediately, disable_alert positional order
  • close_all: comment, alert_message, immediately, disable_alert positional order
  • close_all lowers through the existing engine all-position path as strategy_close with an empty ID, preserved comment, and preserved immediately flag
  • comment and immediately are now supported close_all parameters
  • alert_message and disable_alert retain the existing explicit unsupported warning for compatibility; alert delivery is not claimed as implemented

Causal evidence

The existing order-close-all-cancel-all golden previously exited at 06:30 UTC with an empty comment. Regenerated code exits at TradingView 06:15 UTC and preserves exit_comment global flat, with the same exit price.

A census regenerated 39 close_all corpus files containing 46 calls: 44 comment-bearing calls, one immediately=true call, and no unexpected opcode changes. Updating committed engine corpus generated files remains a follow-up after this codegen merge.

Gates

  • compile-enabled codegen suite: 1579 passed, 2 skipped
  • targeted strategy close tests: 37/37
  • final forced-no-cache scraper sweep: 412/412 accounted as 404 OK + 1 no-trades + 6 transpile errors + 0 compile errors + 1 known run error + 0 driver errors
  • canonical board unchanged at 343 Excellent / 50 Strong / 4 Moderate / 5 Weak; 0 UP / 0 DOWN
  • final sweep transcript SHA-256: 6b5fc0ddd91602a63a037b8c9332e9c3de39493b038f27141cf3e84bfbd6d681

An earlier hard-rejection experiment for unsupported alert controls was rejected after it moved seven Excellent rows to missing. This final head preserves the established warning compatibility boundary.

@luisleo526
luisleo526 merged commit 228fe31 into main Jul 16, 2026
9 checks passed
@luisleo526
luisleo526 deleted the codex/close-all-arguments branch July 16, 2026 13:44
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