Heikin Ashi + MACD Momentum Filter

How It Works
The indicator uses two technical components to produce signals:
- Heikin Ashi for Trend Detection:
Heikin Ashi candles are manually calculated to smooth price action, with the close as the average of OHLC values and the open as the average of the previous Heikin Ashi open and close. These values are further smoothed over a default 5-period moving average. A bullish trend is confirmed when the smoothed Heikin Ashi close is above its open (plotted in green), and a bearish trend when the close is below the open (plotted in red). This smoothing reduces noise, helping traders stay in the direction of the prevailing trend.
- MACD Histogram for Momentum Confirmation:
The MACD, calculated with standard settings (fast=12, slow=26, signal=9), produces a histogram. A buy signal requires the histogram to cross above a threshold (default: 0.0), indicating bullish momentum, while a sell signal requires a cross below, indicating bearish momentum. This ensures trades are taken when momentum supports the trend.
Signal Generation
Signals are generated using the previous bar’s values to prevent repainting:
- Buy Signal: The MACD histogram crosses above the threshold, and the Heikin Ashi confirms a bullish trend. Displayed as a green upward triangle below the bar.
- Sell Signal: The MACD histogram crosses below the threshold, and the Heikin Ashi confirms a bearish trend. Displayed as a red downward triangle above the bar.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Automate TradingView Alerts
tradingviewlink.com/invite?ref=aff_9eq2
🤖🤖🤖🤖
Disclaimer: TradingView Link (tradingviewlink.com) is an independent brand and is not affiliated with, endorsed by, or associated with TradingView.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Automate TradingView Alerts
tradingviewlink.com/invite?ref=aff_9eq2
🤖🤖🤖🤖
Disclaimer: TradingView Link (tradingviewlink.com) is an independent brand and is not affiliated with, endorsed by, or associated with TradingView.