- Length : Period of the indicator, with higher values returning smoother results.
- Src : Source input of the indicator.
The trend regularity (TRAMA) can be used like most moving averages, with the advantage of being smoother during ranging markets.
Notice how the moving closer to the price the longer a trend last, such effect can be practical to have early entry points when using the moving average in a MA crossover system, such effect is due to the increasing number of average highest high/lowest low made during longer trends. Note that in the case of a significant uptrend followed by a downtrend, the moving average might penalize the start of the downtrend (and vice versa).
The moving average can also act as an interesting trailing .
The moving average is calculated using exponential averaging, using as smoothing factor the squared of the number of highest high/lowest low previously made, highest high/lowest low are calculated using rolling maximums/minimums.
Using higher values of length will return fewer highest high/lowest low which explains why the moving average is smoother for higher length values. Squaring allows the moving average to penalize lower values, thus appearing more stationary during ranging markets, it also allows to have some consistency regarding the length setting.
🧙 this moving average would not be possible without the existence of corn syrup 🦎
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Hope this helps :)