CM MACD Custom Indicator - Multiple Time Frame - V2

Jul 28, 2021

Static chart image
Signals
Oscillators
Dashboard
Moving Averages

The CM MACD Custom Indicator - Multiple Time Frame - V2 indicator provides a comprehensive momentum trading toolkit that combines traditional MACD analysis with multi-timeframe (MTF) capabilities and customizable trend visualization. It allows traders to track momentum shifts across different time horizons while offering advanced filtering options for signal clarity.

Usage

The Usage section describes how the script can be used, particularly for identifying trend reversals and momentum strength. Traders can apply the indicator to a lower timeframe chart while setting the "Indicator TimeFrame" to a higher period to identify broader market trends.

Example: A trader on a 5-minute chart can set the indicator to the 1-hour timeframe. If the MACD line crosses above the signal line on the 1-hour timeframe, it may indicate a bullish regime, even if local 5-minute price action is choppy.

The indicator offers several visual modes:

  • Trend Coloring: The MACD line can change color based on whether the trend is bullish or bearish.
  • Price Bar Highlighting: Users can enable "Show Highlight Price Bars" to color the candles on the main chart according to the MACD trend.
  • Crossover Markers: Circles appear at crossover points to signal potential entry or exit points.

Details

The script is constructed using standard Moving Average Convergence Divergence logic but adds flexibility in calculation methods. Unlike standard MACD indicators that rely solely on Exponential Moving Averages (EMA), this tool allows users to choose between Simple Moving Averages (SMA) and EMAs for both the oscillator and the signal line.

The MTF logic is integrated with the platform's native timeframe functionality, ensuring that data is requested and mapped correctly from higher periods to the current chart. The histogram calculation includes a reversal detection logic that identifies when the momentum slope changes direction, providing an early warning of weakening trends.

Settings

General Settings

  • Indicator TimeFrame: Determines the timeframe used for calculations (leave blank for current chart).
  • Fast Length: The period for the shorter moving average.
  • Slow Length: The period for the longer moving average.
  • Source: The price data used for calculation (e.g., Close, HL2).
  • Signal Smoothing: The period for the signal line moving average.
  • Oscillator MA Type: Selects between SMA or EMA for the MACD calculation.
  • Signal Line MA Type: Selects between SMA or EMA for the Signal Line calculation.

Show Plots?

  • Show MACD Lines: Toggles the visibility of the MACD and Signal lines.
  • MACD/Signal Width: Adjusts the thickness of the respective lines.
  • Show Histogram: Toggles the visibility of the central momentum histogram.
  • Show MACD Lines w/ Trend Color: Changes the MACD line color based on the current trend direction.
  • Show Highlight Price Bars: Colors the price bars on the chart according to the MACD trend.
  • Show BackGround on Cross: Highlights the chart background when a crossover occurs.
  • Show Circle on Cross: Displays a dot at the point of a MACD and Signal line crossover.

Color Settings

  • MACD/Signal Line Colors: Customizes the default colors for the oscillator lines.
  • Trend Up/Down: Sets the colors used for bullish and bearish trend indications.
  • Histogram Colors: Allows customization for "Grow" and "Fall" states both above and below the zero line.

Alerts

  • MACD Cross Up/Dn: Triggers an alert when the MACD crosses the signal line.
  • MACD Cross Up & > 0: Filtered alert for bullish crosses occurring specifically above the zero line.
  • MACD Cross Dn & < 0: Filtered alert for bearish crosses occurring specifically below the zero line.
  • Histogram Reversal: Triggers an alert when the histogram changes direction.

FAQ

How do I enable higher timeframe data on my current chart? You can change the "Indicator TimeFrame" setting in the inputs menu to your desired higher period (e.g., 1D, 4H) while staying on your preferred trading timeframe.

What is the difference between the "Grow" and "Fall" histogram colors? "Grow" indicates that momentum is accelerating in its current direction (e.g., histogram bars getting taller above zero), while "Fall" indicates momentum is decelerating or receding toward the zero line.

How do I get access to the CM MACD Custom Indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.