pub enum SignalType {
Buy,
Sell,
Hold,
Close,
}Expand description
A trading signal direction.
Variants§
Buy
Enter long (or flip from short to long).
Sell
Enter short (or flip from long to short).
Hold
No new action. Existing position may or may not be held depending on other gates (stops, max-hold, etc.).
Close
Close the existing position without reversing.
Trait Implementations§
Source§impl Clone for SignalType
impl Clone for SignalType
Source§fn clone(&self) -> SignalType
fn clone(&self) -> SignalType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SignalType
Source§impl Debug for SignalType
impl Debug for SignalType
Source§impl<'de> Deserialize<'de> for SignalType
impl<'de> Deserialize<'de> for SignalType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignalType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignalType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SignalType
impl Display for SignalType
impl Eq for SignalType
Source§impl PartialEq for SignalType
impl PartialEq for SignalType
Source§fn eq(&self, other: &SignalType) -> bool
fn eq(&self, other: &SignalType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SignalType
impl Serialize for SignalType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SignalType
Auto Trait Implementations§
impl Freeze for SignalType
impl RefUnwindSafe for SignalType
impl Send for SignalType
impl Sync for SignalType
impl Unpin for SignalType
impl UnsafeUnpin for SignalType
impl UnwindSafe for SignalType
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