pub struct TradeRow {Show 15 fields
pub instrument: String,
pub opened: String,
pub closed: String,
pub direction: String,
pub quantity: f64,
pub entry: f64,
pub exit: Option<f64>,
pub pnl: f64,
pub commission: f64,
pub held_days: Option<f64>,
pub exit_reason: String,
pub rule: Option<String>,
pub signal: Option<f64>,
pub regime: Option<String>,
pub asked: Option<f64>,
}Expand description
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
One round trip, as a trades table shows it and a CSV export writes it.
Fields§
§instrument: StringWhich instrument the round trip was in. Empty on an ordinary study, whose subject line already says; on a book it is the difference between a usable export and trades from three instruments with no way to tell them apart.
opened: String§closed: String§direction: String§quantity: f64§entry: f64§exit: Option<f64>§pnl: f64§commission: f64§held_days: Option<f64>§exit_reason: String§rule: Option<String>What the rule saw at entry (#190): the condition that fired, the value it was judged on, the regime it saw, and the quantity it asked the gate for. Absent on a trade recorded before the journal or opened by no rule.
signal: Option<f64>§regime: Option<String>§asked: Option<f64>Implementations§
Source§impl TradeRow
impl TradeRow
Sourcepub fn held_days(&self) -> f64
pub fn held_days(&self) -> f64
Returns the value of held_days, or the default value if held_days is unset.
Sourcepub fn signal(&self) -> f64
pub fn signal(&self) -> f64
Returns the value of signal, or the default value if signal is unset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TradeRow
impl<'de> Deserialize<'de> for TradeRow
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for TradeRow
impl Message for TradeRow
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.