Trend Intensity Index measures the strength of a trend by comparing the deviation of the price with its corresponding moving average.
An integer which represent the trend intensity index of the given period.
If the price is greater than the moving average a positive deviation is recorded, and if price is less than the moving average a negative deviation is recorded. Where the size of the deviation in each case is simply the (absolute) difference between the price and the moving average. The indicator is given by the following formula:
TTI = 100 * ( Sum of Positive Deviations ) / ( ( Sum of Positive Deviations ) + ( Sum of Negative Deviations ) )
| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if prices array has strictly negative elements or if the lengthOfMA argument is greater then the length of prices array. |
Momentum Class | WebCab.COM.Finance.Trading.Indicators Namespace