# TRIX: Triple Smoothed Exponential Oscillator In TTR: Technical Trading Rules

## Description

The TRIX indicator calculates the rate of change of a triple exponential moving average. Developed by Jack K. Hutson.

## Usage

 `1` ```TRIX(price, n = 20, nSig = 9, maType, percent = TRUE, ...) ```

## Arguments

 `price` Price series that is coercible to xts or matrix. `n` Number of periods for moving average. `nSig` Number of periods for signal line moving average. `maType` Either: A function or a string naming the function to be called. A list with the first component like (1) above, and additional parameters specified as named components. See Examples. `percent` logical; if `TRUE`, the rate of change is calculated using the `ROC` function, otherwise the `momentum` function is used. `...` Other arguments to be passed to the `maType` function in case (1) above.

## Details

The TRIX is calculated as follows:
3MA = `MA`( `MA`( `MA`(`price`) ) )
trix = 100 * [ 3MA(t) / 3MA(t-1) - 1 ]

## Value

A object of the same class as `price` or a vector (if `try.xts` fails) containing the TRIX values.

## Note

Buy/sell signals are generated when the TRIX crosses above/below zero. A nine-period EMA of the TRIX is used as a default signal line. Buy/sell signals are generated when the TRIX crosses above/below the signal line and is also above/below zero.

Joshua Ulrich

## References

See `EMA`, `SMA`, etc. for moving average options; and note Warning section.

## Examples

 ```1 2 3 4``` ```data(ttrc) trix <- TRIX(ttrc[,"Close"]) trix4 <- TRIX(ttrc[,"Close"], maType=list(list(SMA), list(EMA, wilder=TRUE), list(SMA), list(DEMA))) ```

TTR documentation built on Sept. 21, 2018, 6:31 p.m.