Edge Lab reference

Feature library

144 cursor-safe calculations with one implementation owner.

144 results
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

timeframe
Timeframe · required

Changes required bars, decision-time availability, and research traversal tier.

sma_period
int · default 7

Changes the required history or measurement horizon.

bars_back
int · default 4

Changes the required history or measurement horizon.