Skip to content

Simple Moving Average (SMA)

A Moving Average (MA, or SMA) is one of the most common technical analysis indicators. It calculates the average price of an asset over a selected period of time and displays it as a line on a chart.

A SMA smooths out price fluctuations and helps identify the overall trend direction hidden behind market noise.

Using a Simple Moving Average, it’s easy to determine the prevailing price direction:

  • If the price is above the SMA line, the uptrend (“bullish”) is dominant, and it’s preferable to open Long trades.
  • If the price is below the SMA line, the downtrend (“bearish”) is dominant, and it’s preferable to open Short trades.

Moving Average Trend

⚡ Feature: The SMA reacts to price changes slower than an Exponential Moving Average (EMA). Therefore, SMA is often used for long-term strategies and position holding.

In Veles bots, you can set SMA conditions as a filter to automate the opening and closing of trades following the trend.

One of the key signals is the crossover of the SMA line and the current price:

  • Price crosses the SMA from top to bottom → Sell-signal (open Short or close Long).
  • Price crosses the SMA from bottom to top → Buy-signal (open Long or close Short).

Price and SMA Crossover

This approach helps identify changes in local trends and forms the basis of many trading strategies.

  • Set up the SMA filter in the bot editor.
  • Specify the timeframe and period length (e.g., SMA 50 or SMA 200).
  • Define the condition: price above or below the line, or a crossover event.

SMA can be combined with other indicators (such as RSI, MACD or Bollinger Bands) to filter out false signals and build more sustainable strategies.

  • SMA reacts slowly to price changes due to equal weighting of all periods — it lags more than EMA.
  • During sharp reversals, SMA can remain in the wrong zone for several candles.
  • On short timeframes, the lag makes SMA less useful as a precise entry trigger.

The Simple Moving Average is a foundational trend tool that remains effective despite its simplicity. In Veles bots, it is most useful on higher timeframes to define the overall trend direction, keeping the bot on the right side of the market when combined with faster oscillators.

Help