█ 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.
Questo script è pubblicato con codice protetto, ma puoi comunque usarlo gratuitamente. Mettendolo tra i preferiti potrai applicarlo al grafico, senza però la possibilità di visualizzare o modificare il codice sorgente.
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.