Struct yata::indicators::Kaufman [−][src]
Kaufman Adaptive Moving Average (KAMA)
Links
- https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/kaufmans-adaptive-moving-average-kama/
- https://ru.wikipedia.org/wiki/%D0%90%D0%B4%D0%B0%D0%BF%D1%82%D0%B8%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D0%BA%D0%BE%D0%BB%D1%8C%D0%B7%D1%8F%D1%89%D0%B0%D1%8F_%D1%81%D1%80%D0%B5%D0%B4%D0%BD%D1%8F%D1%8F_%D0%9A%D0%B0%D1%83%D1%84%D0%BC%D0%B0%D0%BD%D0%B0
- https://www.marketvolume.com/technicalanalysis/kama.asp
1 value
KAMA
value
Range of KAMA
values is the same as the range of the source
values.
1 signal
-
if
filter_period
is less or equal than0
, then returns signal whenKAMA
crossessource
value. Whensource
crossesKAMA
upwards, returns full buy signal. Whensource
crossesKAMA
downwards, returns full sell signal. Otherwise returns no signal. -
if
filter_period
is greater than1
, it uses same cross betweensource
andKAMA
, but with additional filtering using standard deviation.
Fields
period1: PeriodType
Volatility calculation period. Default is 10
.
Range in [1
; PeriodType::MAX
).
period2: PeriodType
Fast period. Default is 2
.
Range in [1
; period3
).
period3: PeriodType
Slow period. Default is 30
.
Range in (period2
; PeriodType::MAX
).
filter_period: PeriodType
Filter period. Default is 10
.
Range in [0
; PeriodType::MAX
)
square_smooth: bool
Apply double smoothing. Default is true
.
k: ValueType
Standard deviation multiplier. Default is 0.3
.
Range in (0.0
; +inf
)
source: Source
Source type. Default is Close
Trait Implementations
impl Clone for Kaufman
[src]
impl Copy for Kaufman
[src]
impl Debug for Kaufman
[src]
impl Default for Kaufman
[src]
impl<'de> Deserialize<'de> for Kaufman
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl IndicatorConfig for Kaufman
[src]
type Instance = KaufmanInstance
Type of State
const NAME: &'static str
[src]
fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
[src]
fn validate(&self) -> bool
[src]
fn set(&mut self, name: &str, value: String) -> Result<(), Error>
[src]
fn size(&self) -> (u8, u8)
[src]
fn name(&self) -> &'static str
[src]
fn init_fn<'a, T: OHLCV>(
self,
initial_value: &'a T
) -> Result<Box<dyn FnMut(&'a T) -> IndicatorResult>, Error> where
Self: 'static,
[src]
self,
initial_value: &'a T
) -> Result<Box<dyn FnMut(&'a T) -> IndicatorResult>, Error> where
Self: 'static,
fn over<T, S>(self, inputs: S) -> Result<Vec<IndicatorResult>, Error> where
T: OHLCV,
S: AsRef<[T]>,
Self: Sized,
[src]
T: OHLCV,
S: AsRef<[T]>,
Self: Sized,
impl Serialize for Kaufman
[src]
Auto Trait Implementations
impl RefUnwindSafe for Kaufman
impl Send for Kaufman
impl Sync for Kaufman
impl Unpin for Kaufman
impl UnwindSafe for Kaufman
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,