ta-oliver / infertrade

Open source trading and investment strategy library designed for accessibility and compatibility
Apache License 2.0
34 stars 20 forks source link

TRIPLE EXPONENTIAL AVERAGE (TRIX) - DOCUMENTATION (DESCRIPTIONS OF EXISTING RULES/INDICATORS) #172

Closed Cal231995 closed 3 years ago

Cal231995 commented 3 years ago

What Is TRIX?

The triple exponential average (TRIX) is a momentum indicator used by technical traders that shows the percentage change in a moving average that has been smoothed exponentially three times. The triple smoothing of moving averages is designed to filter out price movements that are considered insignificant or unimportant. TRIX is also implemented by technical traders to produce signals that are similar in nature to the moving average convergence divergence (MACD).

Formula for TRIX TRIX FORMULA

How to compute TRIX calculates a triple exponential moving average of the log of the price input over the period of time specified by the length input for the current bar. The current bar's value is subtracted by the previous bar's value. This prevents cycles that are shorter than the period defined by length input from being considered by the indicator.

  1. Single-smoothed EMA = 14-period EMA calculated based on the price’s close
  2. Double-smoothed EMA = 14-period EMA of the single-smoothed EMA
  3. Triple-smoothed EMA = 14-period EMA of the double-smoothed EMA
  4. TRIX = 1-period per cent change of the triple-smoothed EMA

Allocation Strategy The strategy is to identify the oversold and overbought markets and a momentum indicator

Bullish Momentum: when the trix is above zero Bearish Momentum: when the trix is below zero TRIX CHART

The theory suggests that asset price will have a bullish momentum when the TRIX is above zero levels and vice versa. So: if TRIX > 0 then allocation = max_allocation(long position)

if TRIX < 0 then allocation = -max_allocation(short position) else: allocation = 0

fhashim commented 3 years ago

@Cal231995 moving forward I would suggest if you could provide rule description not copied from investopedia so it can be added on our documentation. Alternatively, I could just add link to investopedia as suggested by @ta-oliver. @Cal231995 please suggest what approach should be taken moving forward.

Cal231995 commented 3 years ago

@Cal231995 moving forward I would suggest if you could provide rule description not copied from investopedia so it can be added on our documentation. Alternatively, I could just add link to investopedia as suggested by @ta-oliver. @Cal231995 please suggest what approach should be taken moving forward.

I think we can paraphrase this or create our own definitions. I'll try to provide our own definitions/descriptions.

Cal231995 commented 3 years ago

What is the TRIX indicator? The triple exponential average, known more commonly as the TRIX is a momentum indicator that is meant to filter out insignificant and unimportant price movements. Many consider it to be similar to the Moving Average Convergence/Divergence (MACD) indicator. The only difference is that the TRIX indicator provides outputs that are smoother due to triple smoothing of the exponential moving averages used to create the indicator. It is an indicator that is usually used for identifying overbought and oversold market conditions.

you can use this description. I type this myself. I'll provide for every other indicators.

fhashim commented 3 years ago

@Cal231995 Sure. Thanks for the assistance.