Ox_kali

Multi-Timeframe Trend Indicator

Ox_kali 已更新   
The Multi-Timeframe Trend Indicator (MTFTI) is a trend analysis tool designed to help traders quickly and easily assess the market direction across multiple timeframes. With the help of a table to visualize the trends on different timeframes.

Key features:
  • Multi-timeframe trend indicator for the following timeframes: 5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 6 hours, 12 hours, 1 day, and 1 week and average.
  • Displays trends for selected timeframes in a table.
  • Considers short and long-term exponential moving averages (EMAs) to determine trends.
  • Calculation of the average trend for all timeframes.
  • Display of trends with appropriate coloring for better readability (green for "Up", red for "Down", and intermediate shades for neutral or strong trends).

List of Parameters
  • Customization of the table's position on the screen (top-left, top-right, middle-left, middle-right, bottom-left, bottom-right).
  • Setting the lengths of the short and long-term exponential moving averages.
  • Option to activate or deactivate the display of EMAs for better customization (true by default).


Please note that the MTFTI is not a guarantee of future market performance and should be used in conjunction with proper risk management. Always ensure that you have a thorough understanding of the indicator’s methodology and its limitations before making any investment decisions. Additionally, past performance is not indicative of future results.
版本注释:
Updated code formatting.
版本注释:
Update Note for Multi-Timeframe Trend Indicator (MTFTI)


New Features:
  • Options to Show/Hide Specific Timeframes: Users can now choose to show or hide specific timeframes in the trend table. This is controlled by the new input variables showTf1, showTf2, ..., showTf11.
  • Dynamic Average Trend Calculation: The script now calculates the average trend based only on the displayed timeframes, making the average more relevant to the user.

Modifications:
  • Removal of Trend Line on Chart: The new version does not contain the trend line (plot(0, "Trend", color=color.gray, linewidth=1, style=plot.style_stepline)) that was present in the previous version.
  • Average Trend Calculation: The calculation of the average trend (trendAvg) has been modified to account for only the active timeframes, thereby avoiding division by zero.

Code Improvements:
  • Initialization of trendSum and activeTfs Variables: New variables have been introduced to dynamically handle the calculation of the average trend.
  • Conditional Table Cell Filling: Conditions have been added for filling the table cells based on the displayed timeframes.
版本注释:
Update Note: Multi-Timeframe Trend Indicator (MTFTI)
The recent version of the MTFTI indicator introduces a series of technical and functional enhancements aimed at optimizing the trend analysis experience for users. This update focuses on extending analytical capabilities, advanced customization, and improving code efficiency.

Added Features and Optimizations :
  • Choice of Moving Average Type: Incorporation of an option allowing users to select among various types of moving averages (SMA, EMA, WMA, AMA). This feature enriches analysis by offering adaptability to diverse trading methodologies.
  • Extension of Timeframe Selections: Addition of extra timeframes, including shorter intervals such as 1min, 2min, and 3min, thus facilitating more detailed and granular analysis.
  • Customization of Display: Introduction of the capability for users to hide or display timeframes according to their preferences, offering a more targeted user experience and improved performance by reducing unnecessary calculations.
  • Dynamic Calculation of Moving Averages: Implementation of a dynamic approach for calculating moving averages via the calcMa function, allowing flexible selection of the moving average type and replacing the previous method based exclusively on the EMA.
  • In-depth Trend Analysis: Trends are now assessed using short-term and long-term moving averages for each selected timeframe, providing a more comprehensive perspective on market dynamics.
  • Advanced Alert System: Implementation of alert conditions based on the average trend value (trendAvg), activating notifications for various market situations from “Strong Down” to “Strong Up”.
  • Code Optimization: Streamlining of the code structure, notably by the early initialization of trend variables, to minimize errors and improve readability and script maintenance.
版本注释:
minor adjustment
版本注释:
Bug Fix: Fixed an issue reported by @XRIICrypto affecting the use of the 10-minute trend. I appreciate the community feedback that helps me improve this script.

In Progress: I am currently working on enhancing user experience by greying out time units that cannot be retrieved due to chart history or TradingView limitations. This update will be made available soon.

Thank you for your support and patience as I continue to develop and refine the script.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?