pub struct CompletedTrade {
pub entry_ts: u64,
pub exit_ts: u64,
pub direction: Direction,
pub entry_price: f64,
pub exit_price: f64,
pub pnl: f64,
pub pnl_pct: f64,
}Expand description
A single closed round-trip trade.
Fields§
§entry_ts: u64Entry timestamp (ms).
exit_ts: u64Exit timestamp (ms).
direction: DirectionDirection of the trade.
entry_price: f64Fill price at entry.
exit_price: f64Fill price at exit.
pnl: f64Absolute P&L (after commissions).
pnl_pct: f64Percentage P&L: pnl / (entry_price * size).
Trait Implementations§
Source§impl Clone for CompletedTrade
impl Clone for CompletedTrade
Auto Trait Implementations§
impl Freeze for CompletedTrade
impl RefUnwindSafe for CompletedTrade
impl Send for CompletedTrade
impl Sync for CompletedTrade
impl Unpin for CompletedTrade
impl UnsafeUnpin for CompletedTrade
impl UnwindSafe for CompletedTrade
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