OPEN-SOURCE SCRIPT
Optimized MTF Indicator

This Pine Script is a custom Multi-Timeframe (MTF) indicator that dynamically adjusts its analysis based on the current chart's timeframe. It calculates MACD crossovers for two different timeframes (a lower and a higher timeframe) and plots visual signals (colored circles) on the chart to indicate the crossovers. This can help traders make more informed decisions by providing insights from multiple timeframes.
The steps are as follows:
The current chart's timeframe is used to dynamically set corresponding lower and higher timeframes.
MACD analysis (with crossovers) is performed for both the lower and higher timeframes.
Visual signals (colored circles) are plotted to indicate the MACD crossovers on both timeframes, helping traders spot potential buy (bullish) or sell (bearish) signals.
The steps are as follows:
The current chart's timeframe is used to dynamically set corresponding lower and higher timeframes.
MACD analysis (with crossovers) is performed for both the lower and higher timeframes.
Visual signals (colored circles) are plotted to indicate the MACD crossovers on both timeframes, helping traders spot potential buy (bullish) or sell (bearish) signals.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.