Moving Average - Exponential (EMA)
<< Click to Display Table of Contents >> Moving Average - Exponential (EMA) |
The exponential moving average is but one type of a moving average. In a simple moving average, all price data has an equal weight in the computation of the average with the oldest value removed as each new value is added. In the exponential moving average equation the most recent market action is assigned greater importance as the average is calculated. The oldest pricing data in the exponential moving average is however never removed.
EMA(int period)
EMA(ISeries<double> input, int period)
Returns default value
EMA(int period)[int barsAgo]
EMA(ISeries<double> input, int period)[int barsAgo]
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
input |
Indicator source data (?) |
period |
Number of bars used in the calculation |
// Prints the current value of a 20 period EMA using default price type |
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.