TRIX {TTR}R Documentation

Triple Smoothed Exponential Oscillator

Description

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

Usage

  TRIX(price, ma1 = list("EMA", n=20), ma2 = ma1, ma3 = ma1,
              ma.sig = list("EMA", n=9), percent = TRUE)

Arguments

price Price series to use.
ma1 A list whose first component is a string containing the moving average function name; additional parameters may also be specified as named components.
ma2 See ma1.
ma3 See ma1.
ma.sig Similar to ma1, but for the signal moving average.
percent logical; if TRUE, the rate of change is calculated using the ROC function, otherwise the momentum function is used.

Details

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

Value

A vector 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.

Author(s)

Josh Ulrich

References

The following site(s) were used to code/document this indicator:
http://www.fmlabs.com/reference/default.htm?url=TRIX.htm
http://www.equis.com/Customer/Resources/TAAZ/?c=3&p=114
http://www.linnsoft.com/tour/techind/trix.htm
http://stockcharts.com/education/IndicatorAnalysis/indic_trix.htm

See Also

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

Examples

  data(ttrc)
  trix <- TRIX( ttrc[,"Close"] )

[Package TTR version 0.13-1 Index]