SMA Node
Simple Moving Average
Overview
The Simple Moving Average (SMA) is one of the most fundamental and widely used technical indicators in trading. It calculates the arithmetic mean of prices over a specified time period, smoothing out price fluctuations to help identify the overall trend direction.
SMAs are particularly useful for identifying support and resistance levels, determining trend direction, and generating trading signals when combined with price action or other indicators.
Formula
The SMA is calculated by taking the arithmetic mean of a given set of prices over a specific number of periods:
For example, a 10-period SMA sums the closing prices of the last 10 periods and divides by 10. As each new period is added, the oldest period is dropped from the calculation.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 10 | The number of periods to include in the moving average calculation. Must be at least 1. |
| source | Node | Auto | The root data source node to calculate SMA from. Automatically detected from connected nodes. |
š” Tip: You can drag the period label left or right to quickly adjust the value, or type in a specific number for precise control.
Common Use Cases
1. Trend Identification
When price is above the SMA, it suggests an uptrend. When price is below the SMA, it suggests a downtrend. The slope of the SMA also indicates trend strength.
2. Support and Resistance
Moving averages often act as dynamic support in uptrends and resistance in downtrends. Common periods like 50, 100, and 200 are closely watched by many traders.
3. Crossover Signals
Combine multiple SMAs with different periods. A shorter-period SMA crossing above a longer-period SMA generates a bullish signal (golden cross), while crossing below generates a bearish signal (death cross).
4. Price Smoothing
Use as input to other indicators to smooth out noise and focus on the underlying trend. For example, calculating RSI or MACD on SMA values instead of raw prices.
Popular Period Settings
| Period | Timeframe | Use Case |
|---|---|---|
| 9-10 | Short-term | Day trading, quick trend changes |
| 20 | Short-term | Swing trading, monthly trend (20 trading days) |
| 50 | Medium-term | Intermediate trend, quarterly overview |
| 100 | Medium-term | Half-year trend analysis |
| 200 | Long-term | Major trend, yearly perspective, widely watched |
Advantages & Limitations
Advantages
- ā¢Simple to understand and interpret
- ā¢Effective for identifying overall trend direction
- ā¢Smooths out price noise and volatility
- ā¢Works well in trending markets
- ā¢Widely recognized, creating self-fulfilling levels
- ā¢Can be used on any timeframe
Limitations
- ā¢Lagging indicator - reacts slowly to price changes
- ā¢Gives equal weight to all periods (recent and old data)
- ā¢Generates false signals in ranging/choppy markets
- ā¢Longer periods have more lag but less noise
- ā¢Shorter periods are more responsive but noisier
- ā¢Not predictive - only shows what has happened
Tips & Best Practices
š” Multiple Timeframes
Use SMAs with different periods simultaneously (e.g., 20, 50, 200) to get a multi-timeframe view of the trend. This helps confirm trend strength and identify potential reversal points.
š Combine with Other Indicators
SMAs work best when combined with other analysis tools. Use them alongside RSI, MACD, or volume indicators to confirm signals and reduce false positives.
ā” Consider EMA for Faster Response
If the lag of SMA is problematic for your strategy, consider using an Exponential Moving Average (EMA) which gives more weight to recent prices and responds faster to price changes.
ā ļø Avoid in Ranging Markets
SMAs generate many false signals in sideways, range-bound markets. In such conditions, consider using oscillators like RSI or Stochastic instead, or wait for a clear trend to emerge.
Example Strategy
Here's a simple SMA crossover strategy using two SMA nodes:
SMA Crossover Strategy
1Setup
- āConnect a Stock Node to two SMA nodes
- āFast SMA: period = 20
- āSlow SMA: period = 50
2Entry Signal (Long)
- āWhen fast SMA crosses above slow SMA (golden cross)
- āConfirms upward momentum
3Exit Signal
- āWhen fast SMA crosses below slow SMA (death cross)
- āOr use a trailing stop based on the slow SMA
4Enhancements
- āAdd volume confirmation for stronger signals
- āUse RSI to avoid overbought conditions
- āAdd a trend filter using 200-period SMA
Related Nodes
EMA (Exponential Moving Average)
Similar to SMA but gives more weight to recent prices for faster response to trend changes.
MACD
Uses exponential moving averages to identify momentum and generate trading signals.
Bollinger Bands
Uses an SMA as its center line with standard deviation bands above and below.
ADX
Measures trend strength. Use with SMA to confirm trend direction and strength.