eventsT4 traversalregular hours
context.events.bars_touched_sma
Check if any of the last N bars touched (low <= SMA <= high) the SMA.
Cursor-sensitive: only use observations available at the decision timestamp.
Signature
context.events.bars_touched_sma(timeframe: Timeframe, sma_period: int = 7, bars_back: int = 4) -> bool- Returns
- bool
- Unit
- boolean
- Timeframes
- parameter
- References
- None
- Missing
- Returns False when the condition cannot be established.
- Operation
- bars_touched_sma
- Stability
- stable
Parameters
timeframeTimeframe · required
Changes required bars, decision-time availability, and research traversal tier.
sma_periodint · default 7
Changes the required history or measurement horizon.
bars_backint · default 4
Changes the required history or measurement horizon.