OPEN-SOURCE SCRIPT
Simple MACD Lines

█ OVERVIEW
This indicator displays only the MACD line and signal line — no histogram.
It sounds simple, but it solves a specific problem: when you try to set a price alert directly on a standard MACD indicator in TradingView, the histogram can interfere and make it hard to place the alert exactly where you want it.
With this indicator, there is nothing but the two lines, so alerts snap cleanly to the line positions.
█ HOW IT WORKS
• Calculates MACD using standard settings (12, 26, 9) — same math as the built-in MACD
• Plots the MACD line in blue and the signal line in red
• Includes a zero line for reference
• No histogram — cleaner chart, easier alert placement
█ HOW TO SET ALERTS
• Hover your cursor over one of the lines on the chart
• A "+" icon will appear — click it to set an alert at that exact price level
• Works well for zero line crosses, signal line crosses, or any custom level you want to watch
█ SETTINGS
• Fast Length — default 12
• Slow Length — default 26
• Signal Length — default 9
• Source — default close
All settings can be adjusted from the indicator's input panel. Colors can be changed from the Style tab.
█ NOTES
• This is a niche tool — if you just want to view MACD visually, the built-in TradingView MACD works fine
• Best used by traders who rely heavily on TradingView's alert system and want precise line-based alert placement
• Can be added as a separate pane alongside your existing indicators without interfering with them
This indicator displays only the MACD line and signal line — no histogram.
It sounds simple, but it solves a specific problem: when you try to set a price alert directly on a standard MACD indicator in TradingView, the histogram can interfere and make it hard to place the alert exactly where you want it.
With this indicator, there is nothing but the two lines, so alerts snap cleanly to the line positions.
█ HOW IT WORKS
• Calculates MACD using standard settings (12, 26, 9) — same math as the built-in MACD
• Plots the MACD line in blue and the signal line in red
• Includes a zero line for reference
• No histogram — cleaner chart, easier alert placement
█ HOW TO SET ALERTS
• Hover your cursor over one of the lines on the chart
• A "+" icon will appear — click it to set an alert at that exact price level
• Works well for zero line crosses, signal line crosses, or any custom level you want to watch
█ SETTINGS
• Fast Length — default 12
• Slow Length — default 26
• Signal Length — default 9
• Source — default close
All settings can be adjusted from the indicator's input panel. Colors can be changed from the Style tab.
█ NOTES
• This is a niche tool — if you just want to view MACD visually, the built-in TradingView MACD works fine
• Best used by traders who rely heavily on TradingView's alert system and want precise line-based alert placement
• Can be added as a separate pane alongside your existing indicators without interfering with them
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.