What it does
The Simple Moving Average (SMA) smooths price by averaging the closing prices of the last N bars, with every bar weighted equally. For example, a 20-period SMA adds the last 20 closes and divides by 20, recalculating as each new bar forms. The result is a single line that filters out bar-to-bar noise and shows the underlying direction of price.
How to add it
Click Indicators (ƒx) in the header.
Search “Simple Moving Average” and click the result.
Hover its legend row and click the gear to open settings.
How traders use it
- Read trend direction: price holding above a rising SMA is an uptrend context, price below a falling SMA is a downtrend context.
- Trade crossovers: a shorter SMA crossing above a longer one (the classic 50/200 golden cross) signals a bullish shift, while crossing below (death cross) signals a bearish one.
- Use popular lengths as dynamic support and resistance: many traders watch the 20, 50, 100 and 200 SMA for bounce or rejection entries.
- Combine with momentum: take SMA-cross entries only when an oscillator such as RSI agrees, to filter weak signals.
- Longer periods (100, 200) suit position trading on daily charts; shorter ones (10, 20) suit swing and intraday work.
Inputs
| Input | Type | Default | Range / Options |
|---|---|---|---|
| Length | number | 9 | 1–10000 |
| Source | select | close | Close / Open / High / Low / HL2 / HLC3 / OHLC4 |
| Offset | number | 0 | -10000–10000 |
| Type | select | None | None / SMA / SMA + Bollinger Bands / EMA / SMMA (RMA) / WMA / VWMA |
| Length | number | 14 | 1–10000 |
| BB StdDev | number | 2 | 0.001–50 |
Plots & styling
| Plot | Style | Default color |
|---|---|---|
| SMA(9) | line | #2196F3 |
Every plot's color, line width and visibility can be changed on the Style tab. Precision, price-scale labels and status-line values are configurable at the bottom of the Style tab.
Tips
- Right-click the indicator's line for quick actions — settings, visibility and removal without hunting through menus.
- Use Add to favorites in the legend menu; starred studies surface at the top of the picker.
- The legend eye toggles it off without losing your settings — handy for before/after comparisons.
Watch out for
- Because every bar is weighted equally, the SMA lags price noticeably and turns late at tops and bottoms.
- In sideways markets price crosses the SMA repeatedly, producing frequent whipsaw signals.