pub struct Position {
pub side: Side,
pub quantity: f64,
pub entry_price: f64,
pub entry_timestamp: u64,
}Expand description
An open position. The backtester tracks at most one at a time.
Fields§
§side: SideDirection of the position.
quantity: f64Position size in units (always positive — direction is in side).
entry_price: f64Fill price net of slippage at entry.
entry_timestamp: u64Bar timestamp of the entry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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