pub struct Trade {
pub entry_id: String,
pub size: f64,
pub entry_price: f64,
pub entry_bar: u64,
pub exit_price: Option<f64>,
pub exit_bar: Option<u64>,
pub commission: f64,
}Expand description
One trade: an entry, and its exit once closed. size is signed — positive is
long, negative short — matching strategy.*trades.size.
Fields§
§entry_id: String§size: f64§entry_price: f64§entry_bar: u64§exit_price: Option<f64>§exit_bar: Option<u64>§commission: f64Commission on entry, plus exit once closed.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trade
impl RefUnwindSafe for Trade
impl Send for Trade
impl Sync for Trade
impl Unpin for Trade
impl UnsafeUnpin for Trade
impl UnwindSafe for Trade
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