pub struct UlcerIndexEngine { /* private fields */ }Expand description
Ulcer Index over the closing price; see UlcerIndexCore for the definition.
This measures the same thing as crate::portfolio::compute_drawdown does not: that one
reports the single worst peak-to-trough decline of a whole series, this one how much time the
series spent below its high and how far. Both stay.
Implementations§
Source§impl UlcerIndexEngine
impl UlcerIndexEngine
pub fn new(len: usize) -> Self
pub fn with_defaults() -> Self
Trait Implementations§
Source§impl Clone for UlcerIndexEngine
impl Clone for UlcerIndexEngine
Source§fn clone(&self) -> UlcerIndexEngine
fn clone(&self) -> UlcerIndexEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UlcerIndexEngine
impl Debug for UlcerIndexEngine
Source§impl Indicator for UlcerIndexEngine
impl Indicator for UlcerIndexEngine
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn reset(&mut self)
Source§fn on_checked_bar(
&mut self,
bar: &Bar,
) -> Result<Option<IndicatorOutput>, BarValidationError>
fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>
Validates a bar before forwarding it to
Indicator::on_bar.fn alerts(&self) -> Vec<IndicatorAlert>
Auto Trait Implementations§
impl Freeze for UlcerIndexEngine
impl RefUnwindSafe for UlcerIndexEngine
impl Send for UlcerIndexEngine
impl Sync for UlcerIndexEngine
impl Unpin for UlcerIndexEngine
impl UnsafeUnpin for UlcerIndexEngine
impl UnwindSafe for UlcerIndexEngine
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