MACD+ EMA Alert version 4h
Apr 8, 2021

The MACD+ EMA Alert version 4h indicator provides a trend-following signaling system that combines moving average filters with MACD momentum to identify high-probability entry and exit points.
Usage
The indicator is primarily designed for the 4-hour timeframe but can be adapted for other intervals and asset classes, including crypto (BTC, ETH), Forex, and stocks.
- Long Entry: Occurs when the price is above the EMA, the MACD histogram is positive (crossing above zero), and the current candle is higher than the previous one.
- Long Exit/Short: Occurs when the price falls below the EMA, the MACD histogram turns negative (crossing below zero), and the current candle is lower than the previous one.
The tool includes a time-filtering feature, allowing users to backtest or view signals only within a specific date range.
Details
This tool utilizes a multi-layered confirmation approach to filter out market noise:
- Trend Filter: An Exponential Moving Average (EMA) determines the primary trend direction.
- Momentum Filter: The MACD Histogram identifies shifts in momentum relative to the zero line.
- Price Action: A simple comparison of the current price against the previous candle's price ensures the trade is moving in the desired direction.
- Heikin Ashi Option: Users can toggle Heikin Ashi calculations for smoother trend detection within the algorithm.
Settings
General Settings
- Use Heikin Ashi Candles in Algo Calculations: When enabled, the indicator uses Heikin Ashi data instead of standard candle closes for signal logic.
Time Conditions
- From Day/Month/Year: Sets the start date for signal calculation.
- To Day/Month/Year: Sets the end date for signal calculation.
EMA Data
- Length: The period for the Exponential Moving Average.
- Source: The price source used for EMA calculation (e.g., Close, HL2).
MACD Histogram
- Fast Length: The period for the fast moving average in the MACD calculation.
- Slow Length: The period for the slow moving average in the MACD calculation.
- Signal Smoothing: The period for the signal line smoothing.
- Simple MA (Oscillator): Toggle to use SMA instead of EMA for the fast/slow lines.
- Simple MA (Signal Line): Toggle to use SMA instead of EMA for the signal line smoothing.
FAQ
How do I use the MACD+ EMA Alert version 4h? Apply the indicator to your chart and look for the "BUY" and "SELL" labels. Ensure your timeframe matches your intended strategy (optimized for 4H).
Can I set up automated alerts? Yes, the indicator includes alert conditions for both Long Entry and Long Exit/Short conditions which can be configured via the TradingView Alert menu.
How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.