Author: Andrey N. Bolkonsky
Ergodic Oscillator by William Blau is based on True Strength Index indicator (see Momentum, Direction, and Divergence: Applying the Latest Momentum Indicators for Technical Analysis).
To indicate the trend reversal, the signal line is used.
The signal line is calculated using the smoothing of a base line (Ergodic, True Strength Index), the averaging period is equal to the last averaging period of a base line.
The trend is upward when base line above the signal line, the trend is downward when base line below the signal line.

Calculation:
Ergodic oscillator is calculated by formula:
Ergodic(price,q,r,s,u) = TSI(price,q,r,s,u)
SignalLine(price,q,r,s,u,ul) = EMA( Ergodic(price,q,r,s,u) ,ul)
where:
Input parameters:
Note:
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/362
Blau_TSI
True Strength Index (TSI) indicator by William Blau.
Blau_Mtm
Momentum Indicator by William Blau.
Stochastic Indicator Blau_TStoch
Stochastic Indicator (smoothed q-period Stochastic) by William Blau.
Stochastic Index Blau_TStochI
Stochastic Index Indicator (normalized smoothed q-period Stochastic) by William Blau.