Trend Envelopes indicator is calculated based on a % of price change. That % is then used to determine if there is a new trend or trend remains the same.
This version is using smooth ATR for the price change calculation instead and is adding prices smoothing prior to be used in calculations. The smoothing can be done using one of the 4 averages types:

Wilders DMI - averages
Wilders DMI - averages
Logarithmic Garman Klass volatility
Logarithmic Garman Klass volatility
Volty channel stop - smooth ATR
Volty channel stop - smooth ATR
Keltner channel - smooth ATR
Keltner channel - smooth ATR