peacefulLizard50262

Triple Brown's Exponential Smoothing (TBES)

This script is a PineScript implementation of the Triple Exponential Moving Average (TEMA) indicator, which is a trend-following indicator used in technical analysis. The TEMA attempts to reduce the lag present in other moving averages by using a triple exponential smoothing technique.

The script begins by declaring the function "indicator" with the name "TBES", and setting the "overlay" parameter to "true" to display the indicator on top of the price chart. It also defines an input parameter called "Source" which is the source data for the TEMA calculation (usually the closing price of a financial asset). It also defines an input parameter called "Alpha" which is a smoothing factor that controls the weighting of the TEMA calculation.

The script then defines the "bes" function, which stands for "Brown's Exponential Smoothing". This function takes in the source data and the alpha smoothing factor as input, and applies the double exponential smoothing calculation to produce a smoothed version of the source data.

The "tbes" function is then defined, which stands for "Triple Brown's Exponential Smoothing" and calculates the TEMA. It does this by first applying the "bes" function to the source data, then applying it again to the output of the first "bes" calculation, and then applying it a third time to the output of the second "bes" calculation. The final TEMA value is then calculated as the sum of three times the difference between the output of the first "bes" calculation and the output of the second "bes" calculation, and the output of the third "bes" calculation.

Finally, the script plots the TEMA value on the chart in green color by calling the "plot" function and passing it the output of the "tbes" function, along with a string label for the indicator.

Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?