Ox_kali

Multi-Timeframe Trend Indicator

Ox_kali Updated   
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.
Release Notes:
Updated code formatting.
Release Notes:
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.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?