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.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.