SMA(bars [,offset,series]): Simple moving average
EMA(bars [,offset,series]): Exponential moving average
VMA(bars [,offset]): Volume weighted moving average
WMA(bars [,offset,series]): Weighted moving average
These functions calculate moving averages for a time series. When evaluates in the past, future splits are reversed out to return a point-in-time value. Please note that our time series are adjusted for dividends to create smooth trends. The parameters are:
bars: the period of the average (use 2-500)
offset: bar offset from the as-of date (use 0-100, defaults to 0)
series: specify alternate time series.
If the requested number of bars to average is greater than the entire number of bars in the time series then this function will return NA.
Examples
To screen for stocks whose 50 bar simple average is above the 200 bar average enter:
SMA(50) > SMA(200)
To screen for stocks whose 50 bar simple average is above the the 50 bar moving average 10 bars ago enter:
SMA(50) > SMA(50,10)
To only buy stocks when the 50 bar simple moving average of the benchmark is above the 200 bar average, enter the following Buy Rule:
SMA(50,0,#Bench) > SMA(200,0,#Bench)
Show more details