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 Standard Deviation for the price change calculation instead and is adding prices smoothing prior...
from https://tradingrobots.net/std-trend-envelopes-of-averages-multi-time-frame-indicator-for-metatrader-5/