Struct yata::indicators::PriceChannelStrategy [−][src]
pub struct PriceChannelStrategy {
pub period: PeriodType,
pub sigma: ValueType,
}
Expand description
Price Channel Strategy
Calculates price channel by highes high and lowest low for last period
candles.
Links
2 values
Upper bound
value
Range of values is the same as the range of the source values.
Lower bound
value
Range of values is the same as the range of the source values.
1 signal
When current high
price touches upper bound
, returns full buy signal.
When current low
price touches lower bound
, returns full sell signal.
When both touches occure, or no toucher, then returns no signal.
Fields
period: PeriodType
Main period length. Default is 20
.
Range in [2
; PeriodType::MAX
)
sigma: ValueType
Relative channel size. Default is 1.0
.
Range in (0.0
; 1.0
]
Trait Implementations
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
type Instance = PriceChannelStrategyInstance
type Instance = PriceChannelStrategyInstance
Type of State
Initializes the State based on current Configuration
Dynamically sets Configuration parameters
Returns an IndicatorResult
size processing by the indicator (count of raw values, count of signals)
Creates an IndicatorInstance
function from this IndicatorConfig
.
Auto Trait Implementations
impl RefUnwindSafe for PriceChannelStrategy
impl Send for PriceChannelStrategy
impl Sync for PriceChannelStrategy
impl Unpin for PriceChannelStrategy
impl UnwindSafe for PriceChannelStrategy
Blanket Implementations
Mutably borrows from an owned value. Read more