pub struct IndicatorRequest {
pub bars: Option<BarsRequest>,
pub indicator: String,
pub params: HashMap<String, f64>,
}Expand description
One indicator over a window of bars, as a rule would declare it.
The chart draws what a rule would see, so the declaration is the rule
language’s own: the indicators entry of a rule file, as JSON, e.g.
{"kind":"EMA","input":"close","period":20} or
{"kind":"MACD","fast":12,"slow":26,"signal":9,"line":"histogram"}.
A period may name a parameter; params supplies it.
Fields§
§bars: Option<BarsRequest>§indicator: String§params: HashMap<String, f64>Trait Implementations§
Source§impl Clone for IndicatorRequest
impl Clone for IndicatorRequest
Source§impl Debug for IndicatorRequest
impl Debug for IndicatorRequest
Source§impl Default for IndicatorRequest
impl Default for IndicatorRequest
Source§impl<'de> Deserialize<'de> for IndicatorRequest
impl<'de> Deserialize<'de> for IndicatorRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for IndicatorRequest
impl Message for IndicatorRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for IndicatorRequest
impl PartialEq for IndicatorRequest
Source§impl Serialize for IndicatorRequest
impl Serialize for IndicatorRequest
impl StructuralPartialEq for IndicatorRequest
Auto Trait Implementations§
impl Freeze for IndicatorRequest
impl RefUnwindSafe for IndicatorRequest
impl Send for IndicatorRequest
impl Sync for IndicatorRequest
impl Unpin for IndicatorRequest
impl UnsafeUnpin for IndicatorRequest
impl UnwindSafe for IndicatorRequest
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