# TRIX - Triple Exponential Moving Average

#### Description <a href="#description_72" id="description_72"></a>

Jack Hutson developed this TRIX indicator, which is a 1-day rate-of-change indicator. What this means is that day 2 is divided by day 1, day 3 by day 2 and so on and so forth, and this is then applied to a triple exponential moving average of the closing prices. This results in a zero line fluctuating oscillator which is used as trend indicator thanks to its stability.

#### Interpretation <a href="#interpretation_36" id="interpretation_36"></a>

A buy signal is created when the TRIX indicator crosses the zero line from bottom to top. A sell signal is generated when the zero line is broken in a downwards direction.

#### Usage <a href="#usage_72" id="usage_72"></a>

```csharp
TRIX(int period, int signalPeriod)
TRIX(IDataSeries inSeries, int period, int signalPeriod)
TRIX(int period, int signalPeriod)[int barsAgo]
TRIX(IDataSeries inSeries, int period, int signalPeriod)[int barsAgo]

//For the signal line
TRIX(int period, int signalPeriod).Signal[int barsAgo]
TRIX(IDataSeries inSeries, int period, int signalPeriod).Signal[int barsAgo]
```

#### Return value <a href="#return-value_69" id="return-value_69"></a>

**double**

When using this method with an index (e.g. **TRIX**(14, 3)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_62" id="parameters_62"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

signal period Number of bars included in the signal line calculation

#### Visualization <a href="#visualization_67" id="visualization_67"></a>

![TRIX - Triple Exponential Moving Average](https://agenatrader.github.io/AgenaIndicator-documentation/media/TRIX.jpg)

#### Example <a href="#example_68" id="example_68"></a>

```csharp
//Output for the TRIX EMA
Print("The current TRIX value is " + TRIX(14, 3)[0]);

//Output for the TRIX signal line
Print("The current TRIX value is " + TRIX(14, 3).Signal[0]);
```
