MACD_CROSS_TRIANGLE
Feb 9, 2024

The MACD_CROSS_TRIANGLE indicator provides a highly customizable framework for identifying bullish and bearish momentum shifts using various MACD-based trigger conditions. By allowing users to select from ten distinct calculation methods, it helps visualize specific trend changes directly on the chart with intuitive triangle labels.
Usage
The tool is designed to highlight specific technical events based on the Moving Average Convergence Divergence (MACD) indicator. To use the script:
- Define Triggers: Navigate to the settings to select which condition triggers a bullish or bearish label. For example, you can set a Bullish signal to trigger when the MACD line crosses over the Signal line (Trigger 1) or when the Histogram becomes positive (Trigger 3).
- Interpret Labels: Upward triangles indicate the selected bullish condition has been met, while downward triangles indicate the bearish condition.
- Analyze Multi-Bar Trends: Use the "Trend No. Bars Back" setting to evaluate triggers based on historical comparisons, such as whether the MACD is higher or lower than it was a specific number of bars ago.
Details
The indicator calculates standard MACD (12, 26, 9) values and evaluates them against ten pre-defined logic sets. These logic sets include:
- Crossovers: Traditional MACD/Signal line or Histogram/Zero line crosses.
- Directional Strength: Comparing the current value of the MACD, Signal line, or Histogram to its value "N" bars back to determine if the component is rising or falling over a specific window.
The script includes a built-in reference table that can be displayed on the chart to quickly identify what each numbered trigger represents, ensuring ease of use when switching between strategies.
Settings
Triggers
- Bullish Up / Bearish Down: Customizes the colors used for the triangle labels.
- Trend No. Bars Back: Determines the lookback period (from 1 to 200 bars) for triggers that compare current values to historical ones (Triggers 5–10).
- Bullish / Bearish Selection: Dropdown menus to select one of the ten available triggers for each direction.
Trigger Size
- Labels: Adjusts the visual size of the triangles on the chart (Tiny to Huge).
Trigger Descriptions Table
- Show Table: Toggles the visibility of the reference table.
- Trigger Descriptions Size: Adjusts the text size within the table.
- Position: Moves the table to various corners or centers of the chart.
- Color: Sets the text color for the table content.
FAQ
How do I access MACD_CROSS_TRIANGLE?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I set different triggers for long and short signals?
Yes, the indicator allows you to independently select any of the ten triggers for bullish and bearish signals, allowing for asymmetrical strategy testing.
What does "Trigger 5" (MACD Rising) specifically calculate?
Trigger 5 checks if the current MACD line value is greater than the MACD line value from the number of bars specified in the "Trend No. Bars Back" setting.
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.