The example shows how to use custom code and build in financial functions. In this case the chart displays Moving Average indicators over the high, low, open or close values of the stock.

A Moving Average is an indicator that shows the average value of a security's price over a period of time. A Simple, or Arithmetic, Moving Average is calculated by adding the price of the security for a number of time periods (e.g. 12 days) and then dividing this total by the number of time periods. The result is the average price of the security over the time period. Simple moving averages give equal weight to each daily price.

A Weighted Moving Average is designed to put more weight on recent data and less weight on past data. A weighted moving average is calculated by multiplying each of the previous day's data by a weight (the weight is the index of the data).

An Exponential Moving Average is calculated by applying a percentage of today's closing price to yesterday's moving average value. Exponential moving averages place more weight on recent prices.

The Modified Moving Average is the same as the Exponential Moving Average. The only difference is in the period of the functions. For example a 14-day MMA is the same as 27-day EMA.

Moving Averages

 
 

Example Controls

Function:
Argument:
Period: