Tradient
Visual Builder

Simple Moving Average

A trend-following indicator based on average price over a set period.

The Simple Moving Average (SMA) calculates the average closing price over a specified number of periods. It's one of the most fundamental and widely used indicators in trading — it smooths out price action to reveal the underlying trend direction.

Why It Matters

The SMA helps you see through the noise of individual candles and identify whether price is generally trending up, down, or moving sideways. Many professional strategies use moving averages as the backbone of their trend identification.

Settings Explained

Direction — Whether to use this indicator for bullish signals (price above SMA), bearish signals (price below SMA), or both.

Period — The number of candles used to calculate the average. Common values: 20 (short-term trend), 50 (medium-term trend), 200 (long-term trend). Lower periods react faster to price changes but produce more false signals.

Price Source — Which price to use for the calculation. 'Close' is the most common. Other options like 'High,' 'Low,' or 'Typical Price' can be useful for specific strategies.

Look Back Mode — How far back the indicator is calculated. Affects the starting point of the calculation in backtesting.

Output

SMA Value — The calculated average price. You can use this in Logic blocks to compare against price or other indicators.

Example Use Case

You set a 50-period SMA and a 200-period SMA, then use a Crossover Detector to buy when the 50 crosses above the 200 (Golden Cross) and sell when it crosses below (Death Cross). This classic strategy captures major trend changes.

The 200-period SMA on the daily chart is one of the most watched levels in all of trading. Many institutions use it as a trend filter — only buying when price is above the 200 SMA.