SMA — Simple Moving Average
What it measures: Average price, weighted equally across every bar
When to use it: Like EMA but slower — good as a macro reference line (SMA200) or a mean-reversion baseline
Typical period: 20 / 50 / 200
Caution: More lag than EMA — a trigger from an SMA cross always enters later
Formula the engine actually uses
close.rolling(period).mean()
smoothing: SMA (simple average) · warmup: period