Module yata::methods [−][src]
Expand description
Commonly used methods for manipulating timeseries.
Every method implements Method
trait.
To create a method instance use Method::new
.
To get new output value over the input value use Method::next
.
// creating Weighted Moving Average of length `5`
use yata::prelude::*;
use yata::methods::WMA;
let mut wma = WMA::new(5, &20.0).unwrap();
let input_value = &34.51;
let output_value = wma.next(input_value);
Examples
use yata::prelude::*;
use yata::methods::SMA;
let mut sma = SMA::new(3, &5.0).unwrap();
sma.next(&5.0);
sma.next(&4.0);
assert_eq!(sma.next(&6.0), 5.0);
assert_eq!(sma.next(&2.0), 4.0);
assert_eq!(sma.next(&-2.0), 2.0);
Modules
Renko implementation entities
Structs
Accumulation Distribution Index of specified length
for timeseries of OHLCV
Commodity channel index of specified length
for time series of type ValueType
Converting between different timeframes.
Searches for value
timeseries line crosses base
line upwards
Searches for value
timeseries line crosses base
line downwards
Double Exponential Moving Average of specified length
for timeseries of type ValueType
Derivative of specified window length
for timeseries of ValueType
Exponential Moving Average of specified length
for timeseries of type ValueType
Hull Moving Average for last length
values for timeseries of type ValueType
Converts default OHLCV
s into Heikin Ashi OHLCV
s
Returns highest value index over the last length
values for timeseries of type ValueType
Calculates absolute difference between highest and lowest values over the last length
values for timeseries of type ValueType
Linear regression moving average for last length
values of timeseries of type ValueType
Calculate moving linear volatility for last length
values of type ValueType
Searches for lower reversal points over last left
+right
+1 values of type ValueType
Returns lowest value index over the last length
values for timeseries of type ValueType
Mean absolute deviation of specified length
for timeseries of type ValueType
Median absolute deviation of specified length
for timeseries of type ValueType
Moves timeseries by length
items forward
Running Moving Average of specified length
for timeseries of type ValueType
Rate of change calculates relative difference between current
value and n-th value back, where n = length
Searches for reversal points over last left
+right
+1 values of type ValueType
Simple Moving Average of specified length
for timeseries of type ValueType
Simple Moving Median of specified length
for timeseries of type ValueType
Moving Standard Deviation over the window of size length
for timeseries of type ValueType
Triple Exponential Moving Average of specified length
for timeseries of type ValueType
True Strength Index of specified short period
and long period
for timeseries of type ValueType
Searches for upper reversal points over last left
+right
+1 values of type ValueType
Volume Weighed Moving Average of specified length
for timeseries of type (ValueType
, ValueType
) which represents pair of values (value
, volume
)
Variable Index Dynamic Average of specified length
for timeseries of type ValueType
Weighted Moving Average of specified length
for timeseries of type ValueType
.
Wilder’s Smoothing Average of specified length
for timeseries of type ValueType