Exponential Moving Average FactorAn 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:
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© |
| Browser Based Help. Published by chm2web software. |