Skip to main content

Module dynamic

Module dynamic 

Source
Expand description

TaEngine-based dynamic indicator calculation.

This module provides a bridge between the streaming motosan-ta-stream engine and the existing TechnicalIndicators struct. It enables two workflows:

  1. calculate_snapshot โ€“ feeds candles through a TaEngine and returns a TaSnapshot containing all indicator values.
  2. snapshot_to_indicators โ€“ converts a TaSnapshot back into the legacy TechnicalIndicators struct for backward compatibility with the rule engine.

Helper functions get_snapshot_value / get_snapshot_sub_value provide direct access to individual indicator values inside a snapshot.

Functionsยง

build_default_engine
Build a TaEngine with the standard set of indicators used by strategy templates. The returned engine covers every indicator present in TechnicalIndicators.
calculate_snapshot
Feed a slice of candles through a TaEngine and return the final snapshot.
get_snapshot_sub_value
Get a named sub-value from a multi-value indicator.
get_snapshot_value
Get a single (or primary) value from a TaSnapshot by indicator key.
snapshot_to_indicators
Convert a TaSnapshot into the legacy TechnicalIndicators struct.