This is an update by Lightangel112 to Trendilo (Open-Source).
Thanks @ Lightangel112
The Modern Trend Identifier (MTI) is a sophisticated technical analysis tool designed for traders and analysts seeking to accurately determine market trends. This indicator leverages the Arnaud Legoux Moving Average (ALMA) to smooth price data and calculate percentage changes, providing a clearer and more responsive trend analysis. MTI is engineered to highlight trend direction with visual cues, fill areas between the indicator and its bands, and color bars based on trend direction, making it a powerful tool for identifying market momentum and potential reversals.
Capabilities
Smoothing and Trend Calculation:
Utilizes ALMA to smooth price data, reducing noise and providing a clearer view of the trend.
Calculates percentage changes in price over a user-defined lookback period.
Dynamic Range Adjustment:
Normalizes the ALMA percentage change values to ensure they stay within a -100 to 100 range.
Uses a combination of linear and smoothstep compression to handle extreme values without losing sensitivity.
Trend Direction and Highlighting:
Determines the trend direction based on the relationship between the smoothed ALMA percentage change and dynamically adjusted RMS (Root Mean Square) bands.
Colors the trend line to visually indicate whether the market is in an uptrend, downtrend, or neutral state.
Dynamic Threshold Calculation:
Calculates dynamic thresholds using percentile ranks to adapt to changing market conditions.
Visualization Enhancements:
Fills areas between the ALMA percentage change line and its RMS bands to provide a clear visual indication of the trend strength.
Offers the option to color price bars based on the identified trend direction.
Customizable Settings:
Provides extensive customization options for lookback periods, smoothing parameters, ALMA settings, band multipliers, and more.
Allows users to enable or disable various visual enhancements and customize their appearance.
Use Cases
Trend Identification:
MTI helps traders identify the current market trend, whether it's bullish, bearish, or neutral. This can be particularly useful for trend-following strategies.
Momentum Analysis:
By highlighting areas of strong momentum, MTI enables traders to spot potential breakouts or breakdowns. This can be useful for both entry and exit decisions.
Support and Resistance Levels:
The dynamic threshold bands can act as support and resistance levels. Traders can use these levels to set stop-loss and take-profit orders.
Divergence Detection:
MTI can help in identifying divergences between price and the indicator, which can signal potential trend reversals. This is useful for traders looking to capitalize on trend changes.
Risk Management:
The fill areas and colored bars provide clear visual cues about trend strength and direction, aiding in better risk management. Traders can adjust their positions based on the strength of the trend.
Backtesting:
The extensive customization options allow traders to backtest different settings and parameters to optimize their trading strategies for various market conditions.
Multiple Timeframes:
MTI can be applied to multiple timeframes, from intraday charts to daily, weekly, or monthly charts, making it a versatile tool for traders with different trading styles.
Example Scenarios
Day Trading:
A day trader can use MTI on a 5-minute chart to identify intraday trends. By adjusting the lookback period and smoothing parameters, the trader can quickly spot potential entry and exit points based on short-term momentum changes.
Swing Trading:
A swing trader might apply MTI to a 4-hour chart to identify medium-term trends. The dynamic thresholds can help in setting appropriate stop-loss levels, while the trend direction highlighting aids in making informed decisions about holding or exiting positions.
Position Trading:
For a position trader using a daily chart, MTI can help identify the overarching trend. The trader can use the fill areas and bar coloring to assess the strength of the trend and make decisions about entering or exiting long-term positions.
Market Analysis:
An analyst could use MTI to study historical price movements and identify patterns. By examining how the indicator reacted to past market conditions, the analyst can gain insights into potential future price movements.
In summary, the Modern Trend Identifier (MTI) is a versatile and powerful tool that enhances trend analysis with advanced smoothing techniques, dynamic adjustments, and comprehensive visual cues. It is designed to meet the needs of traders and analysts across various trading styles and timeframes, providing clear and actionable insights into market trends and momentum.
Updated with the following:
Additions and Enhancements in MTI
Grouped Inputs with Descriptive Tooltips:
Inputs are organized into groups for better clarity.
Each input parameter includes a descriptive tooltip.
Dynamic Threshold Calculation:
Added dynamic threshold calculation using percentile ranks to adapt to changing market conditions.
Normalization and Compression:
Added normalization factor to ensure plots are within -100 to 100 range.
Introduced smoothstep function for smooth transition and selectively applied linear and smoothstep compression to values outside -80 to 100 range.
Enhanced Visualization:
Highlighted trend direction with RGB colors.
Enhanced fill areas between the ALMA percentage change line and its RMS bands.
Colored price bars based on the identified trend direction.
RMS Lines Adjustment:
Dynamically adjusted RMS calculation without strict capping.
Ensured RMS lines stay below fill areas to maintain clarity.
Descriptive and Organized Code:
Enhanced code clarity with detailed comments.
Organized code into logical sections for better readability and maintenance.
Key Differences and Improvements.
Input Customization:
Trendilo: Inputs are simple and ungrouped.
MTI: Inputs are grouped and include tooltips for better user guidance.
Trend Calculation:
Trendilo: Uses ALMA and calculates percentage change.
MTI: Enhanced with normalization, compression, and dynamic threshold calculation.
Normalization and Compression:
Trendilo: No normalization or compression applied.
MTI: Normalizes values to -100 to 100 range and applies smoothstep compression to handle extreme values.
Dynamic RMS Adjustment:
Trendilo: Simple RMS calculation.
MTI: Dynamically adjusted RMS calculation to ensure clarity in visualization.
Visual Enhancements:
Trendilo: Basic trend highlighting and filling.
MTI: Enhanced visual cues with RGB colors, dynamic threshold bands, and improved fill areas.
Code Clarity:
Trendilo: Functional but lacks detailed comments and organization.
MTI: Well-organized, extensively commented code for better readability and maintainability.