pub struct HtfIndicatorSpec {
pub interval: Interval,
pub htf_key: String,
pub base_key: String,
pub indicator: Indicator,
pub utc_offset_secs: i64,
}Expand description
Describes an indicator that must be pre-computed on a resampled (HTF) candle series.
Returned by Condition::htf_requirements and processed by the engine to build
stretched arrays stored in StrategyContext::indicators under htf_key.
Fields§
§interval: IntervalTarget higher timeframe interval.
htf_key: StringKey under which the stretched value is stored (e.g. "htf_1wk_sma_20").
base_key: StringKey the inner condition looks up (e.g. "sma_20").
indicator: IndicatorIndicator to compute on the resampled HTF candles.
utc_offset_secs: i64UTC offset in seconds for the exchange whose candles are being resampled.
Passed to resample so that weekly/monthly bucket boundaries align with
the exchange’s local calendar rather than UTC. Use
Region::utc_offset_secs to obtain the correct value, or 0 for UTC.
Trait Implementations§
Source§impl Clone for HtfIndicatorSpec
impl Clone for HtfIndicatorSpec
Source§fn clone(&self) -> HtfIndicatorSpec
fn clone(&self) -> HtfIndicatorSpec
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for HtfIndicatorSpec
impl RefUnwindSafe for HtfIndicatorSpec
impl Send for HtfIndicatorSpec
impl Sync for HtfIndicatorSpec
impl Unpin for HtfIndicatorSpec
impl UnsafeUnpin for HtfIndicatorSpec
impl UnwindSafe for HtfIndicatorSpec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more