Exponential Moving Average Factor

An exponential (or exponentially weighted) moving average is calculated by applying a percentage of today's closing price to yesterday's moving average value.

For example, to calculate a 9% exponential moving average of IBM: First, we would take today's closing price and multiply it by 9%. We would then add this product to the value of yesterday's moving average multiplied by 91% (100% - 9% = 91%).

Syntax:

Public Function ExpMovAvgFactor(ByVal EMAIn() As Double, ByVal Factor As Double) As Double

Parameters:

  • ByVal EMAIn() As Double
  • ByVal Factor As Double

Back to list

 

Example:

 

    Dim TA4Net As New TA4Net.CTAFunctions("YOUR-REGISTRATION-CODE")

    Dim Result() As Double

    Dim CloseValues() As Double

 

    ' loading values to array

    CloseValues = GetCloseValues()

    ' calculating Technical Analysis function

    Result = TA4Net.ExpMovAvgFactor(CloseValues, 0.15)

 


TA4.NET® Franz AG 2004©
Web site: http://www.ta4.net
e-mail: support@ta4.net

Browser Based Help. Published by chm2web software.