pub struct DcConfig { /* private fields */ }Expand description
Configuration for the Donchian Channel (Dc) indicator.
The Donchian Channel tracks the highest high and lowest low over a
rolling window of length bars. The source is always the OHLC
high/low extremes — the source field is fixed to
[PriceSource::Close] and has no effect on computation.
§Example
use quantedge_ta::DcConfig;
let config = DcConfig::builder().build();
assert_eq!(config.convergence(), 20);Implementations§
Source§impl DcConfig
impl DcConfig
Sourcepub fn builder() -> <Self as IndicatorConfig>::Builder
pub fn builder() -> <Self as IndicatorConfig>::Builder
Sourcepub fn source(&self) -> PriceSource
pub fn source(&self) -> PriceSource
Sourcepub fn convergence(&self) -> usize
pub fn convergence(&self) -> usize
Trait Implementations§
Source§impl IndicatorConfig for DcConfig
impl IndicatorConfig for DcConfig
Source§type Builder = DcConfigBuilder
type Builder = DcConfigBuilder
Builder type for constructing this config.
Source§fn source(&self) -> PriceSource
fn source(&self) -> PriceSource
Price source to extract from each bar.
Source§fn convergence(&self) -> usize
fn convergence(&self) -> usize
Bars until
compute returns Someimpl Copy for DcConfig
impl Eq for DcConfig
impl StructuralPartialEq for DcConfig
Auto Trait Implementations§
impl Freeze for DcConfig
impl RefUnwindSafe for DcConfig
impl Send for DcConfig
impl Sync for DcConfig
impl Unpin for DcConfig
impl UnsafeUnpin for DcConfig
impl UnwindSafe for DcConfig
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