OPEN-SOURCE SCRIPT
Signal Generator: HTF EMA Momentum + MACD

HTF EMA Momentum + MACD Indicator
This indicator combines higher timeframe (HTF) EMA momentum with MACD signals to identify potential trend-aligned trades. It displays an HTF histogram for momentum (green for up, red for down) and MACD lines in a subwindow, with buy/sell labels on the main chart when conditions align.
Key Components:
HTF Histogram:
Based on EMA differences from a selected higher timeframe (default H1). It reflects momentum: green if current diff > previous (with optional strict 3-bar check), red otherwise. Can ignore EMA crossover if "HTF Momentum Only" is enabled.
MACD Lines: Standard MACD (fast/slow/signal) on the current timeframe, with adjustable scaling.
Signals:
Buy: HTF uptrend + MACD cross up below -Zero Band + min gap filter.
Sell: HTF downtrend + MACD cross down above +Zero Band + min gap filter.
Labels appear 1.5 ATR (adjustable) from the candle, sized large for visibility.
Filters: Zero Band avoids near-zero crosses; Min MACD Gap ensures separation.
Extras: Toggleable zero levels, alerts, and full customization of periods, colors, and scales.
Usage Tips:
Apply to any timeframe; set HTF for broader context (e.g., H4 for intraday). Use signals as entry cues with additional confirmation like support/resistance. Backtest thoroughly—risk management is essential.
This indicator combines higher timeframe (HTF) EMA momentum with MACD signals to identify potential trend-aligned trades. It displays an HTF histogram for momentum (green for up, red for down) and MACD lines in a subwindow, with buy/sell labels on the main chart when conditions align.
Key Components:
HTF Histogram:
Based on EMA differences from a selected higher timeframe (default H1). It reflects momentum: green if current diff > previous (with optional strict 3-bar check), red otherwise. Can ignore EMA crossover if "HTF Momentum Only" is enabled.
MACD Lines: Standard MACD (fast/slow/signal) on the current timeframe, with adjustable scaling.
Signals:
Buy: HTF uptrend + MACD cross up below -Zero Band + min gap filter.
Sell: HTF downtrend + MACD cross down above +Zero Band + min gap filter.
Labels appear 1.5 ATR (adjustable) from the candle, sized large for visibility.
Filters: Zero Band avoids near-zero crosses; Min MACD Gap ensures separation.
Extras: Toggleable zero levels, alerts, and full customization of periods, colors, and scales.
Usage Tips:
Apply to any timeframe; set HTF for broader context (e.g., H4 for intraday). Use signals as entry cues with additional confirmation like support/resistance. Backtest thoroughly—risk management is essential.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.