Struct yata::indicators::WoodiesCCI
source · pub struct WoodiesCCI {
pub period1: PeriodType,
pub period2: PeriodType,
pub s1_lag: PeriodType,
pub source: Source,
}
Expand description
Woodies Commodity Channel Index
§Links
- https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/WoodiesCCI.html
- https://ftmo.com/en/woodies-cci-system/
§2 values
Turbo CCI
value
Range in (-inf
; +inf
)
Trend CCI
value
Range in (-inf
; +inf
)
§1 signals
- When
Trend CCI
stays above zero line fors1_lag
bars, returns full buy signal. WhenTrend CCI
stays below zero line fors1_lag
bars, returns full sell signal. Otherwise returns no signal.
Fields§
§period1: PeriodType
Turbo
CCI period
period2: PeriodType
Trend
CCI period
s1_lag: PeriodType
Signal #1 bars count to occur
source: Source
Source type of values. Default is Close
Trait Implementations§
source§impl Clone for WoodiesCCI
impl Clone for WoodiesCCI
source§fn clone(&self) -> WoodiesCCI
fn clone(&self) -> WoodiesCCI
Returns a copy of the value. Read more
1.0.0 · 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 WoodiesCCI
impl Debug for WoodiesCCI
source§impl Default for WoodiesCCI
impl Default for WoodiesCCI
source§impl<'de> Deserialize<'de> for WoodiesCCI
impl<'de> Deserialize<'de> for WoodiesCCI
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IndicatorConfig for WoodiesCCI
impl IndicatorConfig for WoodiesCCI
§type Instance = WoodiesCCIInstance
type Instance = WoodiesCCIInstance
Type of State
source§fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
fn init<T: OHLCV>(self, candle: &T) -> Result<Self::Instance, Error>
Initializes the State based on current Configuration
source§fn set(&mut self, name: &str, value: String) -> Result<(), Error>
fn set(&mut self, name: &str, value: String) -> Result<(), Error>
Dynamically sets Configuration parameters
source§fn size(&self) -> (u8, u8)
fn size(&self) -> (u8, u8)
Returns an
IndicatorResult
size processing by the indicator (count of raw values, count of signals)
source§impl Serialize for WoodiesCCI
impl Serialize for WoodiesCCI
impl Copy for WoodiesCCI
Auto Trait Implementations§
impl RefUnwindSafe for WoodiesCCI
impl Send for WoodiesCCI
impl Sync for WoodiesCCI
impl Unpin for WoodiesCCI
impl UnwindSafe for WoodiesCCI
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
source§impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
impl<T, I, C> IndicatorConfigDyn<T> for Cwhere
T: OHLCV,
I: IndicatorInstanceDyn<T> + IndicatorInstance<Config = C> + 'static,
C: IndicatorConfig<Instance = I> + Clone + 'static,
source§fn init(
&self,
initial_value: &T
) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
fn init( &self, initial_value: &T ) -> Result<Box<dyn IndicatorInstanceDyn<T>>, Error>
Dynamically initializes the State based on the current Configuration
source§fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
fn over(&self, inputs: &dyn AsRef<[T]>) -> Result<Vec<IndicatorResult>, Error>
Evaluates dynamically dispatched
IndicatorConfig
over series of OHLC and returns series of IndicatorResult
s Read more