pub struct CompiledIndicator {
pub descriptor: IndicatorDescriptor,
pub requirements: DataRequirements,
pub program: Program,
/* private fields */
}Expand description
A compiled source program and the metadata discovered from that source.
Fields§
§descriptor: IndicatorDescriptor§requirements: DataRequirements§program: ProgramImplementations§
Source§impl CompiledIndicator
impl CompiledIndicator
Sourcepub fn warmup_bars(&self, config: &IndicatorConfig) -> Option<usize>
pub fn warmup_bars(&self, config: &IndicatorConfig) -> Option<usize>
Static bars of history the plotted values need before they are
meaningful, resolved from constants, inputs, and windowed intrinsics.
Returns None when history analysis exceeds its limits.
Sourcepub fn warmup_bars_with_limits(
&self,
config: &IndicatorConfig,
limits: RuntimeLimits,
) -> Option<usize>
pub fn warmup_bars_with_limits( &self, config: &IndicatorConfig, limits: RuntimeLimits, ) -> Option<usize>
Resolve warmup using the same rolling-window policy as the runtime.
Sourcepub fn anchor_start(
&self,
config: &IndicatorConfig,
reference_time: i64,
) -> Option<i64>
pub fn anchor_start( &self, config: &IndicatorConfig, reference_time: i64, ) -> Option<i64>
Earliest UTC boundary an anchored intrinsic needs data from, resolved
from the configuration. Returns None when the indicator has no
anchored calculations such as ta.avwap, or when analysis exceeds its limits.
Sourcepub fn validate_history_analysis(
&self,
config: &IndicatorConfig,
) -> Result<(), PlanningError>
pub fn validate_history_analysis( &self, config: &IndicatorConfig, ) -> Result<(), PlanningError>
Reject configurations whose history analysis exceeds its work or depth limits.
Sourcepub fn requires_anchored_history(&self) -> bool
pub fn requires_anchored_history(&self) -> bool
Whether the compiled program contains calculations requiring complete anchor history.
Sourcepub fn instantiate(
&self,
config: IndicatorConfig,
) -> Result<IndicatorInstance, PlanningError>
pub fn instantiate( &self, config: IndicatorConfig, ) -> Result<IndicatorInstance, PlanningError>
Create an instance that evaluates only the frames supplied by the chart.