#[non_exhaustive]pub enum BracketFailurePolicy {
CloseEntry,
KeepUnprotected,
}Expand description
What the execution service does when a bracket entry has been filled but its protective stop-loss leg could not be placed.
A bracket entry is placed before its SL + TP legs (the legs are reduce-only and need the position to exist). If the stop-loss leg is then rejected, the bot is holding a position with none of the protection the brain asked for. This policy decides what happens next.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CloseEntry
Immediately close the entry with a reduce-only market order (default). The brain asked for a protected position; if the framework can’t protect it, it doesn’t hold it. If the close itself fails, an error is logged — at that point manual intervention is required.
KeepUnprotected
Keep the position open and log an error. Use when the host has its own protective layer (e.g. exchange-side account stops) and an unprotected entry is acceptable.
Trait Implementations§
Source§impl Clone for BracketFailurePolicy
impl Clone for BracketFailurePolicy
Source§fn clone(&self) -> BracketFailurePolicy
fn clone(&self) -> BracketFailurePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BracketFailurePolicy
Source§impl Debug for BracketFailurePolicy
impl Debug for BracketFailurePolicy
Source§impl Default for BracketFailurePolicy
impl Default for BracketFailurePolicy
Source§fn default() -> BracketFailurePolicy
fn default() -> BracketFailurePolicy
impl Eq for BracketFailurePolicy
Source§impl PartialEq for BracketFailurePolicy
impl PartialEq for BracketFailurePolicy
Source§fn eq(&self, other: &BracketFailurePolicy) -> bool
fn eq(&self, other: &BracketFailurePolicy) -> bool
self and other values to be equal, and is used by ==.