Repository navigation
docs: add the changelog lines for three fixes already on main - #346
Conversation
The Unreleased section lists the keyword-argument and allow_entry_in fixes of #327 but not three other changes it made. Add them: - a var array with a non-empty initializer declared inside an if block is initialized when the declaration is first reached (#333); - strategy.risk.max_drawdown() and strategy.risk.max_intraday_loss() called with type = strategy.percent_of_equity, or with that constant held in a variable, apply the percentage limit like the positional form (#325, #326); - max_bars_back() with a const int depth keeps that depth (#326). Each form was run next to its control (the positional or literal form, or the same var declared at the top level) on the released 1.10.0 and on main: every form listed here differs from its control on 1.10.0 and equals it on main. Documentation only; CHANGELOG.md is the only file changed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Adds three changelog entries documenting codegen fixes, each of which requires regenerating C++ and relinking strategies. - strategy.risk.max_drawdown() and max_intraday_loss() now apply the percentage limit when called with type = strategy.percent_of_equity, whether passed as a keyword or held in a variable. Before, those forms were read as account currency, so a limit of 10 halted trading early. - max_bars_back(series, DEPTH) honours a const int DEPTH. - A var array with a non-empty initializer inside an if block is initialized on first reach, matching TradingView.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 77 functions depend on the 77 functions this change touches.
Health — grade A; no new coupling hotspots.
Verification — 77 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 77 function(s) in the blast radius were not formally verified this run
Cross-repo impact
Cross-repo impact
No cross-repo impact detected among the indexed peer repo(s).
1 peer repo(s) in this group are not yet indexed — cross-repo impact may be incomplete.
Cross-repo linkage is derived (SCIP-moniker matches are sound; name/contract matches are heuristic) and ADVISORY — it never affects this check's conclusion.
Summary
Adds three lines to the Unreleased section of
CHANGELOG.mdfor changes that #327 put on main and that have no release note yet:vararray with a non-empty initializer declared inside anifblock is initialized when the declaration is first reached (Known issue: a var array with an initializer declared inside an if block stays empty #333);strategy.risk.max_drawdown()andstrategy.risk.max_intraday_loss()called withtype = strategy.percent_of_equity, or with that constant held in a variable, apply the percentage limit like the positional form (Known issue: direction restrictions and percentage limits in strategy.risk calls #325, Known issue: some supplied arguments are ignored or shifted in v1.10.0 #326);max_bars_back(series, DEPTH)with aconst intdepth keeps that depth (Known issue: some supplied arguments are ignored or shifted in v1.10.0 #326).The lines sit after the
strategy.risk.allow_entry_inline of #292, in the style of their neighbours (issue and pull request numbers at the end, "Regenerate C++ and relink strategies." because the emitted C++ changes for these forms).How the lines were checked
Each form was run next to its control on BTCUSDT 1h bars (2024-01-01 to 2024-03-01): the script was translated, built and run, and its trades were joined with the trades of the control by entry time and quantity. The control is the same script with the positional argument, the literal depth, or the
vardeclared at the top level, so the two scripts differ in that one call or declaration only.vararray case places no order (the array stays empty); the keyword and variable risk forms place 1 entry (max_drawdown) and 62 entries (max_intraday_loss) against 144; theconstdepth case differs on 10 of 36 entries.vararray case, 144 of 144 for each of the four risk forms, and 36 of 36 for the depth case.vararray case istests/test_conditional_var_array_first_reach.py.What is not covered
CHANGELOG.mdis the only file changed, and no test of the repository reads it.strategy.risk.max_drawdown()keeps its existing warning about partial runtime support.🤖 Generated with Claude Code