Skip to main content

SMA

Type: sma • Category: indicators

Description​

Calculates SMA moving average based on price list

Parameters​

NameTypeDescriptionRequiredDefault
dataExpstringprices datano
pricestringPrice field to use to calculate SMAno
timeperiodnumberNumber of periods to use for SMA calculationno14
indicatorstringno"SMA"

Help​

SMA

Simple Moving Average​

Description​

The SMA (Simple Moving Average) worker is a widely used indicator in financial analysis that calculates the average price of a security over a specified period of time. This worker helps users smooth out price data by creating a constantly updated average price.

What does this worker do?​

The SMA worker takes a list of prices and calculates the simple moving average based on a specified time period. It uses the following parameters:

  • dataExp: prices data
  • price: Price field to use to calculate SMA
  • timeperiod: Number of periods to use for SMA calculation
  • indicator: No description

How to interpret the results​

The SMA indicator can be used to:

  • Identify trends: A rising SMA indicates an uptrend, while a falling SMA indicates a downtrend.
  • Provide support and resistance levels: The SMA can act as a support level in an uptrend and a resistance level in a downtrend.
  • Generate signals: Crossovers between the SMA and the price can be used as buy or sell signals.

Example Use Cases​

The SMA indicator can be used in various financial analysis scenarios, such as:

  • Analyzing stock prices to identify trends and potential buy or sell signals.
  • Evaluating the performance of a portfolio by comparing it to a benchmark SMA.

Visualizing the SMA Indicator​

For a visual representation of how to use the SMA indicator, refer to the following GIFs:

Full GIF​

[![Full GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)

Short GIF​

[![Short GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)

Additional Information​

The Simple Moving Average is one of the most commonly used indicators in technical analysis. It's essential to note that the SMA is a lagging indicator, meaning it reacts to price movements after they have occurred. As such, it can provide a smoothed-out view of price action but may not always accurately predict future price movements.