pub struct BrokerConfig {
pub initial_capital: f64,
pub mintick: f64,
pub sizing: Sizing,
pub pyramiding: usize,
pub commission: Option<Commission>,
pub slippage: f64,
}Expand description
The account settings a strategy() declaration configures its broker with,
so a custom BrokerFactory can honour the script’s parameters rather than
inventing its own.
Fields§
§initial_capital: f64Starting capital (strategy.initial_capital).
mintick: f64The symbol’s tick size, or 0 when unknown.
sizing: SizingHow an order’s absent qty is sized.
pyramiding: usizeHow many entries in the same direction may stack (pyramiding).
commission: Option<Commission>Per-trade commission, or None when the script sets none.
slippage: f64Slippage applied to fills, in ticks.
Trait Implementations§
Source§impl Clone for BrokerConfig
impl Clone for BrokerConfig
Source§fn clone(&self) -> BrokerConfig
fn clone(&self) -> BrokerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BrokerConfig
Source§impl Debug for BrokerConfig
impl Debug for BrokerConfig
Source§impl PartialEq for BrokerConfig
impl PartialEq for BrokerConfig
impl StructuralPartialEq for BrokerConfig
Auto Trait Implementations§
impl Freeze for BrokerConfig
impl RefUnwindSafe for BrokerConfig
impl Send for BrokerConfig
impl Sync for BrokerConfig
impl Unpin for BrokerConfig
impl UnsafeUnpin for BrokerConfig
impl UnwindSafe for BrokerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more