VivaTrades
Technical Indicators

What is Simple Moving Average (SMA)?

Learn how SMA works and how to use it in your trading strategies.

4 min readBeginner friendly

What you'll learn

Learn how SMA works and how to use it in your trading strategies.

The Simple Moving Average (SMA) is one of the most widely used technical indicators in trading. It calculates the average price of a security over a specific number of periods, helping traders identify trends and potential support/resistance levels.

Quick Tip: SMA is often the first indicator new traders learn because of its simplicity and effectiveness in identifying trends.

How SMA is Calculated

SMA is calculated by adding the closing prices for a set number of periods and dividing by that number of periods:

SMA = (P₁ + P₂ + P₃ + ... + Pₙ) / n

Example: 5-day SMA
Prices: ₹100, ₹102, ₹104, ₹103, ₹105
SMA = (100 + 102 + 104 + 103 + 105) / 5 = ₹102.80

Common SMA Periods

Different periods serve different purposes:

PeriodUse CaseTrader Type
SMA 10Very short-term trendDay traders
SMA 20Short-term trendSwing traders
SMA 50Medium-term trendPosition traders
SMA 200Long-term trendInvestors

Trading Strategies Using SMA

Strategy 1: SMA Crossover

When a shorter SMA crosses above a longer SMA, it's considered a bullish signal. When it crosses below, it's bearish.

  • Golden Cross: SMA 50 crosses above SMA 200 → Strong bullish signal
  • Death Cross: SMA 50 crosses below SMA 200 → Strong bearish signal

Strategy 2: Price vs SMA

A simple but effective approach:

  • Price above SMA 200 → Bullish bias, look for buying opportunities
  • Price below SMA 200 → Bearish bias, avoid buying or consider shorting

Strategy 3: SMA as Dynamic Support/Resistance

In trending markets, the SMA often acts as:

  • Support in uptrends — price bounces off SMA
  • Resistance in downtrends — price rejected at SMA
Pro Tip: Many institutional traders watch the SMA 200 on daily charts. When price approaches this level, expect increased activity.

SMA vs EMA: What's the Difference?

FeatureSMAEMA
WeightEqual to all pricesMore weight to recent prices
ResponsivenessSlowerFaster
Best forIdentifying major trendsCatching quick moves
False signalsFewerMore

Using SMA in VivaTrades

You can create powerful SMA-based strategies in VivaTrades:

  • Crossover strategy: SMA 20 crosses above SMA 50
  • Trend filter: Close > SMA 200
  • Pullback entry: Low ≤ SMA 20 AND Close > SMA 20
  • Slope check: SMA 200 today > SMA 200 (5 bars ago)
Caution: SMA works best in trending markets. In sideways/ranging markets, it can generate many false signals. Always combine with other confirmation indicators.

Ready to test this?

Apply what you've learned with real Indian stock data.