Class ExponentialMovingAverageIndicator
java.lang.Object
com.bluebell.greenhouse.radicle.services.technical.indicators.impl.ExponentialMovingAverageIndicator
- All Implemented Interfaces:
TechnicalIndicator
@Component("exponentialMovingAverageIndicator")
public class ExponentialMovingAverageIndicator
extends Object
implements TechnicalIndicator
An Exponential Moving Average (EMA) is a moving average that places greater emphasis on recent
data points, making it more sensitive to recent price changes than a Simple Moving Average (SMA).
The formula for calculating an EMA includes a multiplier that gives more weight to recent
observations. Source
- Version:
- 1.0.12
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComputes the indicator values for the given market prices and input parameters.Returns theIndicatorType.
-
Constructor Details
-
ExponentialMovingAverageIndicator
public ExponentialMovingAverageIndicator()
-
-
Method Details
-
compute
@Transactional public List<IndicatorValue> compute(List<MarketPrice> marketPrices, Map<String, Object> inputParameters, boolean commit) Computes the indicator values for the given market prices and input parameters.- Specified by:
computein interfaceTechnicalIndicator- Parameters:
marketPrices-ListofMarketPriceinputParameters- input parameterscommit- if true, will save the computed values to the database- Returns:
ListofIndicatorValue
-
getIndicator
Returns theIndicatorType.- Specified by:
getIndicatorin interfaceTechnicalIndicator- Returns:
IndicatorType
-