Mtf Macd Jo
- Indicators
- Version: 1.2
The MTF MACD.mq5 indicator is a custom technical indicator designed for the MetaTrader 5 (MT5) platform . It is a Multi-Timeframe (MTF) implementation of the standard MACD (Moving Average Convergence Divergence) indicator .
With the MTF capability, you can view MACD signals from a higher timeframe (e.g., H1 or D1) directly on your active chart timeframe (e.g., M5 or M15) without switching chart views .
Visual Display & Features
-
Separate Window: Displays in an indicator window below the main price chart ( indicator_separate_window ) .
-
MACD Histogram (Main Line): Rendered as silver bar histograms ( clrSilver ) with a width of 2 .
-
Signal Line: Rendered as a single solid red line ( clrRed ) .
Input Parameters
-
InpTimeframe: Sets the target higher timeframe for MACD calculations (Default: H1) .
-
InpFastEMA: Period for the fast Exponential Moving Average (Default: 12) .
-
InpSlowEMA: Period for the slow Exponential Moving Average (Default: 26) .
-
InpSignalSMA: Period for the Signal Line (Default: 9) .
-
InpAppliedPrice: Price type used for calculations, such as Close price (Default: PRICE_CLOSE ) .
How It Works
-
MTF Data Retrieval: Initializes an internal iMACD handle calculated on the specified target timeframe .
-
Time Synchronization: Uses the iBarShift function to match each candlestick timestamp on the active chart with the corresponding bar on the higher timeframe .
-
Data Mapping: Copies the higher timeframe MACD and Signal buffer values and projects them onto the active chart in real-time .
Practical Use Case
This indicator simplifies top-down analysis. Traders can quickly identify the higher-timeframe trend direction while searching for lower-timeframe entry points within a single chart window.
