API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Visualizers |

**Main Page**- Category List
- Knowledge Base
- Tutorial Videos
- Traders Tips
- Indicator documentation
- Addin examples

Advanced Search »

```
public CTI(Bars bars, DataSeries ds, int period, bool positiveOnly, string description)
public static CTI Series(Bars bars, DataSeries ds, int period, bool positiveOnly)
```

Bars |
A Bars object |

ds |
Data series the indicator is based on |

period |
Indicator lookback period |

positiveOnly |
If true, only positive values are returned |

- For any stock, within a certain hour, there are many traders that follow a large number of influences (news, gut feelings, rumours, etc). Given many random events the net outcome of all these trader's orders is a random price shift.
- The exact distribution of the random price shift does not matter. Mostly its assumed that the distribution is symmetric which generates zero drift. In fact the distribution is close to a "normal" or "gaussian" distribution with enlarged kurtosis. The exact shape of the distribution is not important for what follows.
- The sequence of these random price shifts from hour to hour generate a pure random walk.
- In a random walk the variance of the prices grows linearly with time. While the expected value for a price after time t is equal to the starting price (meaning there are no moves on average), the StdDev of the "target price distribution" after time t is proportional to sqrt(t).
- The growth of variance with time can be used to check if the prices move strictly according to a "pure" random walk. If a large number of "moves" after time t are symmetric around zero with a StdDev proportional to t it is a pure random walk. If the StdDev is larger, prices tend to trend. If StDev is smaller prices tend to "revert to the mean". This is the basis of the "Variance Ratio Test" of mean reversion.
- T. S. Chande's CTI Indicator uses a "shortcut" method to see if prices trend, are purely random or revert to the mean. Instead of using a large number of moves the "current" price move after time P*t is compared against the StdDev of a number of moves of length t.
- This means the CTI Indicator gives a rather "noisy" measure of the trendiness or mean reverting behaviour of the price series.

Originally created for WL4 by fundtimer and DrKoch.

- WealthScript Code Library Item
- Tushar S. Chande, Beyond Technical Analysis: how to develop and implement a winning trading system, 2nd Edition 2001, p. 31