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. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟