pub struct SizingConfig {
pub margin_per_trade: f64,
pub leverage: u32,
pub max_contracts: u32,
}Expand description
Configuration for PositionSizer.
Fields§
§margin_per_trade: f64Default margin to commit per trade in quote currency (e.g. USDT).
leverage: u32Leverage multiplier. Used to convert margin into notional.
max_contracts: u32Hard ceiling on contracts per trade — never exceeded regardless of what the formula returns.
Trait Implementations§
Source§impl Clone for SizingConfig
impl Clone for SizingConfig
Source§fn clone(&self) -> SizingConfig
fn clone(&self) -> SizingConfig
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 moreSource§impl Debug for SizingConfig
impl Debug for SizingConfig
Source§impl Default for SizingConfig
impl Default for SizingConfig
Source§impl<'de> Deserialize<'de> for SizingConfig
impl<'de> Deserialize<'de> for SizingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SizingConfig
impl RefUnwindSafe for SizingConfig
impl Send for SizingConfig
impl Sync for SizingConfig
impl Unpin for SizingConfig
impl UnsafeUnpin for SizingConfig
impl UnwindSafe for SizingConfig
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