pub struct ClosedTradeReport {Show 22 fields
pub trade_num: usize,
pub entry_id: String,
pub entry_comment: String,
pub entry_side: Direction,
pub entry_price: f64,
pub entry_bar: usize,
pub entry_time: i64,
pub exit_id: String,
pub exit_comment: String,
pub exit_price: f64,
pub exit_bar: usize,
pub exit_time: i64,
pub quantity: f64,
pub profit: f64,
pub profit_percent: f64,
pub cumulative_profit: f64,
pub cumulative_profit_percent: f64,
pub max_runup: f64,
pub max_runup_percent: f64,
pub max_drawdown: f64,
pub max_drawdown_percent: f64,
pub commission: f64,
}Expand description
A single closed (completed) trade.
Corresponds to one row in the “List of Trades” tab.
Fields§
§trade_num: usizeTrade number (0-based).
entry_id: StringEntry order ID (e.g. "Long Entry").
entry_comment: StringEntry order comment.
entry_side: DirectionEntry direction.
entry_price: f64Entry fill price.
entry_bar: usizeBar index at entry.
entry_time: i64Entry time as UNIX milliseconds.
exit_id: StringExit order ID.
exit_comment: StringExit order comment.
exit_price: f64Exit fill price.
exit_bar: usizeBar index at exit.
exit_time: i64Exit time as UNIX milliseconds.
quantity: f64Number of contracts / shares.
profit: f64Realized profit (after commission).
profit_percent: f64Realized profit as percentage of entry value.
cumulative_profit: f64Running sum of profit up to and including this trade.
cumulative_profit_percent: f64Running sum of profit percent (of initial capital) up to and including this trade.
max_runup: f64Maximum favorable excursion during the trade.
max_runup_percent: f64Maximum favorable excursion as percentage.
max_drawdown: f64Maximum adverse excursion during the trade.
max_drawdown_percent: f64Maximum adverse excursion as percentage.
commission: f64Total commission (entry + exit).
Trait Implementations§
Source§impl Clone for ClosedTradeReport
impl Clone for ClosedTradeReport
Source§fn clone(&self) -> ClosedTradeReport
fn clone(&self) -> ClosedTradeReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClosedTradeReport
impl Debug for ClosedTradeReport
Auto Trait Implementations§
impl Freeze for ClosedTradeReport
impl RefUnwindSafe for ClosedTradeReport
impl Send for ClosedTradeReport
impl Sync for ClosedTradeReport
impl Unpin for ClosedTradeReport
impl UnwindSafe for ClosedTradeReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.