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.

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?