Exponential Moving Average (EMA)
For a list of all members of this type, see EMA Members.
System.Object
RQuant.Indicator.TTimeArray
RQuant.Indicator.TDoubleArray
RQuant.Indicator.TIndicator
RQuant.Indicator.EMA
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
An Exponential Moving Average is another type of Moving Average. In a Simple Moving Average, the price data have an equal weight in the computation of the average. Also, in a Simple Moving Average, the oldest price data are removed from the Moving Average as a new price is added to the computation.
The Exponential Moving Average assigns a weight to the price data as the average is calculated. Thus, the oldest price data in the Exponential Moving Average are never removed, but they have only a minimal impact on the Moving Average.
This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".
Formula:
TDataManager.cd("Demo");
TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;
DateTime Date1 = DateTime.Parse("1999/02/08");
DateTime Date2 = DateTime.Parse("2000/12/29");
TDailyArray Daily = Daily1.Clone(Date1, Date2);
TCanvas Canvas = new TCanvas("Canvas","EMA DEMO",600,400);
Canvas.Divide(1,2);
EMA EMA = new EMA(Daily, 14);
Canvas.cd(1);
Daily.Draw("c");
Canvas.cd(2);
EMA.Draw(Color.Red);
Namespace: RQuant.Indicator
Assembly: RQuant.Indicator (in RQuant.Indicator.dll)
EMA Members | RQuant.Indicator Namespace