pub struct Trade {
pub symbol: String,
pub entry_date: String,
pub exit_date: String,
pub entry_price: f64,
pub exit_price: f64,
pub quantity: i64,
pub pnl: f64,
pub pnl_percentage: f64,
pub commission_paid: f64,
}Expand description
Trade record from backtest
Fields§
§symbol: String§entry_date: String§exit_date: String§entry_price: f64§exit_price: f64§quantity: i64§pnl: f64§pnl_percentage: f64§commission_paid: f64Trait Implementations§
Source§impl FromNapiValue for Trade
impl FromNapiValue for Trade
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Trade
impl ToNapiValue for Trade
Source§unsafe fn to_napi_value(env: napi_env, val: Trade) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Trade) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for Trade
impl ValidateNapiValue for Trade
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for Trade
impl RefUnwindSafe for Trade
impl Send for Trade
impl Sync for Trade
impl Unpin 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