Struct yata::indicators::MoneyFlowIndex
source · pub struct MoneyFlowIndex {
pub period: PeriodType,
pub zone: ValueType,
}
Expand description
Money Flow Index
§Links
§3 values
upper bound
const value
Range in [0.5
; 1.0
]
MFI
value
Range in [0.0
; 1.0
]
lower bound
const value
Range in [0.0
; 0.5
]
§2 signals
-
When
MFI
value crosseslower bound
downwards, returns full buy signal. WhenMFI
value crossesupper bound
upwards, returns full sell signal. Otherwise returns no signal. -
When
MFI
value crosseslower bound
upwards, returns full buy signal. WhenMFI
value crossesupper bound
downwards, returns full sell signal. Otherwise returns no signal.
Fields§
§period: PeriodType
Main period size. Default is 14
.
Range is [2
; PeriodType::MAX
).
zone: ValueType
Signal zone size. Default is 0.2
.
Range is [0.0
; 0.5
]. Value 0.5
means that the lower bound
is the same as the upper bound
.
Trait Implementations§
source§impl Clone for MoneyFlowIndex
impl Clone for MoneyFlowIndex
source§fn clone(&self) -> MoneyFlowIndex
fn clone(&self) -> MoneyFlowIndex
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MoneyFlowIndex
impl Debug for MoneyFlowIndex
source§impl Default for MoneyFlowIndex
impl Default for MoneyFlowIndex
source§impl<'de> Deserialize<'de> for MoneyFlowIndex
impl<'de> Deserialize<'de> for MoneyFlowIndex
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 IndicatorConfig for MoneyFlowIndex
impl IndicatorConfig for MoneyFlowIndex
§type Instance = MoneyFlowIndexInstance
type Instance = MoneyFlowIndexInstance
Type of State
source§fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
Initializes the State based on current Configuration
source§fn set(&mut self, name: &str, value: String) -> Result<(), Error>
fn set(&mut self, name: &str, value: String) -> Result<(), Error>
Dynamically sets Configuration parameters
source§fn size(&self) -> (u8, u8)
fn size(&self) -> (u8, u8)
Returns an
IndicatorResult
size processing by the indicator (count of raw values, count of signals)
source§impl Serialize for MoneyFlowIndex
impl Serialize for MoneyFlowIndex
impl Copy for MoneyFlowIndex
Auto Trait Implementations§
impl RefUnwindSafe for MoneyFlowIndex
impl Send for MoneyFlowIndex
impl Sync for MoneyFlowIndex
impl Unpin for MoneyFlowIndex
impl UnwindSafe for MoneyFlowIndex
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
source§impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
source§fn init(
&self,
initial_value: &T
) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
fn init( &self, initial_value: &T ) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
Dynamically initializes the State based on the current Configuration
source§fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
Evaluates dynamically dispatched
IndicatorConfig
over series of OHLC and returns series of IndicatorResult
s Read more