Expand description
Guardrails for agent adjustment frequency and magnitude.
Prevents the AI agent from adjusting strategy parameters too often or too aggressively. Two independent checks are provided:
- Rate limiting – enforces a minimum interval between adjustments.
- Loss freeze – blocks all adjustments when daily losses exceed a configurable percentage of the daily loss limit.
A magnitude clamp function caps per-cycle deltas for stop-loss, take-profit, and position size relative to the current strategy parameters.
Structs§
- Adjuster
Guardrails - Configurable limits on how often and how much the agent can adjust strategy parameters in a single cycle.
- Guardrail
State - Mutable state tracked across adjustment cycles.
Enums§
- Guardrail
Verdict - Result of the pre-adjustment guardrail check.
Functions§
- check_
can_ adjust - Check whether an adjustment is allowed right now.
- clamp_
adjustment - Clamp a
StrategyAdjustmentso that no single-cycle delta exceeds the configured magnitude limits.