Skip to content

feat: support pre-risk strategy hook#40

Merged
stefan-jansen merged 1 commit into
mainfrom
release/pre-risk-strategy-hook
Jul 25, 2026
Merged

feat: support pre-risk strategy hook#40
stefan-jansen merged 1 commit into
mainfrom
release/pre-risk-strategy-hook

Conversation

@stefan-jansen

Copy link
Copy Markdown
Contributor

Summary

  • add Strategy.on_before_risk() so strategies can submit opening orders before position-risk evaluation
  • allow position rules to be explicitly cleared globally or per asset
  • add trail_include_entry_bar_extremes to opt into using entry-bar extremes for next-bar trailing watermarks
  • preserve risk-exit metadata through order creation options

Verification

  • pre-commit run --all-files
  • uv run ty check
  • uv run pytest tests/ -q
  • uv run mkdocs build --strict
  • uv build

Copilot AI review requested due to automatic review settings July 25, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit 883785e into main Jul 25, 2026
7 checks passed
@stefan-jansen
stefan-jansen deleted the release/pre-risk-strategy-hook branch July 25, 2026 16:57
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.

2 participants