█ Overview The Trend Indicator script is designed to help traders identify the direction and strength of momentum in the price of a digital asset. By using historical price data, it calculates and provides daily signals indicating whether the asset is in an uptrend, downtrend, or no trend at all. The script can be applied to various cryptocurrencies, such as Bitcoin and Ether, using their respective price charts.
█ Key Concepts and Calculation Methodology
For calculations, the script uses the 180 most recent candles.
The Trend Indicator is calculated based on four moving average pairs (MAPs), which compare shorter-term and longer-term moving averages of the asset's price. The moving averages are exponentially weighted, meaning more recent prices have a greater impact on the average than older prices. The half-life of the moving averages determines the weight decay.
The script uses the following moving average pairs: 1-day vs. 5-day 2.5-day vs. 10-day 5-day vs. 20-day 10-day vs. 40-day
█ Calculation Steps
Exponentially Weighted Moving Averages (EWMA): Each moving average is calculated using an exponential decay factor and a normalization factor to adjust for the fixed window of 180 observations.
Component Inputs: For each moving average pair, the script compares the shorter-term moving average to the longer-term moving average. If the shorter-term average is greater than or equal to the longer-term average, the component input is +1 (indicating an uptrend). If it is less, the input is -1 (indicating a downtrend).
Trend Indicator Value: The script averages the four component inputs to produce a final value ranging from -1 to +1, representing the trend's direction and strength: +1: Significant uptrend +0.5: Uptrend 0: No trend -0.5: Downtrend -1: Significant downtrend
█ Learn More For more information about the Bitcoin Trend Indicator and other trading tools, please visit my TradingView profile. Feel free to reach out with any questions or feedback.
Этот скрипт опубликован с закрытым исходным кодом, вы можете свободно им пользоваться. Можно добавить его в избранное и использовать на графике. Вы не можете просматривать или менять его исходный код.
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.