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.
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:
| Period | Use Case | Trader Type |
|---|---|---|
| SMA 10 | Very short-term trend | Day traders |
| SMA 20 | Short-term trend | Swing traders |
| SMA 50 | Medium-term trend | Position traders |
| SMA 200 | Long-term trend | Investors |
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
SMA vs EMA: What's the Difference?
| Feature | SMA | EMA |
|---|---|---|
| Weight | Equal to all prices | More weight to recent prices |
| Responsiveness | Slower | Faster |
| Best for | Identifying major trends | Catching quick moves |
| False signals | Fewer | More |
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)
