# SMI Ergodic Indicator and Oscillator

SMI Ergodic is calculated the same as the True Strength Index except it is a double-smoothed. It also includes a signal line (in purple below) that is an exponential moving average of the SMI Ergodic plot (in orange below). Similar to Stochastics but absent the compression seen with stochastics at extremes. The Ergodic indicator helps identify long trends in prices. As with most oscillators, the overbought or oversold extremes are considered the signal areas.

SMI Ergodic Oscillator plots the difference between the SMI Erdogic and the signal line.

Custom PCF Formula
 SMI Ergodic `XAVG(XAVG(C - C1, s), l) / XAVG(XAVG(ABS(C - C1), s), l)` `s`=ShortPeriod, `l`=LongPeriod, `p`=SignalPeriod Signal `XAVG(XAVG(XAVG(C - C1, s), l) / XAVG(XAVG(ABS(C - C1), s), l), p)` Histogram `XAVG(XAVG(C - C1, s), l) / XAVG(XAVG(ABS(C - C1), s), l) - XAVG(XAVG(XAVG(C - C1, s), l) / XAVG(XAVG(ABS(C - C1), s), l), p)`

Where `s` is the short period which must be an integer.

Where `l` is the long period which must be an integer.

Where `p` is the signal period which must be an integer.

### Examples

A SMI Ergodic Indicator 5, 20 can be written as follows.

`XAVG(XAVG(C - C1, 5), 20) / XAVG(XAVG(ABS(C - C1), 5), 20)`

A SMI Ergodic Signal 5, 20, 5 can be written as follows.

`XAVG(XAVG(XAVG(C - C1, 5), 20) / XAVG(XAVG(ABS(C - C1), 5), 20), 5)`

An SMI Ergodic Oscillator 5, 20, 5 can be written as follows.

`XAVG(XAVG(C - C1, 5), 20) / XAVG(XAVG(ABS(C - C1), 5), 20) - XAVG(XAVG(XAVG(C - C1, 5), 20) / XAVG(XAVG(ABS(C - C1), 5), 20)`, 5)  