TRIX

Introduction
The TRIX Indicator is a kind of triple smoothed average. It can eliminate a number of whipsaws with only marginal lag in the signal compared to faster indicators.

Construction

 * 1) Chose the periods n based on the time frame you are trading
 * 2) EMA1 = EMA (period.close)
 * 3) EMA2 = EMA (EMA1)
 * 4) EMA3 = EMA (EMA2)
 * 5) TRIX (period) = ( EMA3 (period) - EMA3 (period.previous) ) / EMA3 (period.yesterday)

Signals

 * Go long when TRIX turns up below zero, ie (TRIX < 0) && (DIFF(TRIX) > 0) -> Long
 * Go short when TRIX turns down above zero, ie (TRIX > 0) && (DIFF(TRIX) < 0) -> Short