Your interactive trading laboratory!
 • 
8 users online

Indicator Spotlight - SMA

The Simple Moving Average indicator calculates the average of a series of values using a specific lookback period. The result is a line that moves along the data, representing a smoothed version of the source.

Quantacula Code

SMA mySMA50 = new SMA(bars.Close, 50);
SMA mySMA200 = SMA.Series(bars.Close, 200);

Parameters

  • source (TimeSeries)
  • period (int)

Calculation

For each trading period, the Simple Moving Average is the mean of the most recent "period" data points.

SMA = Sum(period data points) / period

Interpretation

  • The trend is typically considered Bullish when prices are above the SMA.
  • The trend is typically considered Bearish when prices are below the SMA.
  • Bullish signals occur when a fast-period SMA crosses over a slow-period SMA.
  • Bearish signals occur when a fast-period SMA crosses under a slow-period SMA.
  • The 200-day SMA is a common standard indicator to indicate the long term trend.
  • A Golden Cross occurs when the 50-day SMA crosses above the 200-day SMA.
  • A Death Cross occurs when the 50-day SMA crosses below the 200-day SMA.
  • In sideways markets, spurious SMA crossovers can occur frequently. This phenomenon is known as whipsaws.

Indicator Lab

Use the sliders below to control the periods of a fast SMA and a slow SMA. When the fast-period SMA crosses over the slow-period SMA, the chart background is colored green. When it crosses under, the chart background is colored red.


Symbol
FastPeriod
20
SlowPeriod
50
Charts powered by JuicyCharts, Quantacula's custom web charting engine. Would you like JuicyCharts for your web site? Contact us for more info!

Models Using SMA
created by Q Merlin on 4/27/2019
published on 4/27/2019
205

APR: 7.85% • Win Rate: 72.72% • Sharpe: 1.99
SMA
ZScore
created by Q BWO1000 on 4/7/2019
published on 4/7/2019
217

APR: 8.92% • Win Rate: 40.13% • Sharpe: 0.48
SMA
created by Q Merlin on 1/6/2019
published on 1/6/2019
195
2
4

APR: 2.08% • Win Rate: 67.68% • Sharpe: 0.10
!MKT
RSI SMA
created by Q Merlin on 11/18/2018
published on 11/18/2018
361
1
4

APR: 14.15% • Win Rate: 55.56% • Sharpe: 0.81
!MKT
SMA
created by Q Merlin on 11/18/2018
published on 11/18/2018
303
3
6

APR: 4.25% • Win Rate: 77.14% • Sharpe: 0.46
SMA
created by Q Glitch on 10/23/2018
published on 10/23/2018
757
6
6

APR: 17.81% • Win Rate: 66.69% • Sharpe: 1.07
SB
RSI SMA
created by Q Robert on 9/27/2018
published on 9/27/2018
389
1
6

APR: 11.40% • Win Rate: 63.28% • Sharpe: 0.79
SB
ATRP
Highest Lowest
LRSlope
ROC
RSI SMA
StdDev
StdError
created by Q Eugene on 9/24/2018
published on 9/24/2018
407
1

APR: 7.82% • Win Rate: 73.05% • Sharpe: 0.81
ATRP
Highest Lowest
LRSlope
ROC
RSI SMA
StdDev
StdError
created by Q Glitch on 9/18/2018
published on 9/18/2018
444
4

APR: 11.55% • Win Rate: 47.10% • Sharpe: 1.06
SB
SMA


Discussion
Attachment

Submit your Post
Cancel

There are no discussions for this indicator yet.
Submit Changes
Cancel
Delete Post