Module: oscillator
Source:
oscillator.rs
Oscillator indicators for momentum and mean-reversion analysis.
Includes [Rsi] (Relative Strength Index), [Stochastic], [Cci]
(Commodity Channel Index), and [WilliamsR] (%R).
Structs
pub struct Rsi
#![allow(unused)]
fn main() {
pub struct Rsi {
period: usize,
gains: RingVec,
losses: RingVec,
avg_gain: Option < f64 >,
avg_loss: Option < f64 >,
prev: Option < f64 >,
count: usize,
};
}
pub struct Macd
#![allow(unused)]
fn main() {
pub struct Macd {
fast_ema: super :: ma :: Ema,
slow_ema: super :: ma :: Ema,
signal_ema: super :: ma :: Ema,
};
}
pub struct MacdOutput
#![allow(unused)]
fn main() {
pub struct MacdOutput {
pub macd_line: f64,
pub signal_line: f64,
pub histogram: f64,
};
}
pub struct Cci
#![allow(unused)]
fn main() {
pub struct Cci {
period: usize,
typical_buffer: RingVec,
constant: f64,
};
}
pub struct Roc
#![allow(unused)]
fn main() {
pub struct Roc {
period: usize,
buffer: RingVec,
};
}
pub struct Stochastic
#![allow(unused)]
fn main() {
pub struct Stochastic {
period: usize,
high_buffer: RingVec,
low_buffer: RingVec,
};
}