OPEN-SOURCE SCRIPT
MACD Overlay v1 [JopAlgo]

Meet the MACD you can trade directly from the chart.
MACD Overlay v1 doesn’t just plot an oscillator somewhere below—
it puts value, momentum, and participation on your candles, and it refuses to fire inside chop.
When a triangle prints, it’s because energy released (expansion), not because the chart looked cute.
What it is:
An execution-ready MACD overlay with phase gating (Expansion-Only), participation gating (Weakness-Lite), and one-click Classic vs VW-MACD Compare—all adaptive, with minimal inputs.
What’s in v1 (feature set)
Overlay ribbon on price: Fast/Slow MACD value rendered as a price-level ribbon with contextual fill and optional candle tint.
Dual value model: Classic MA-MACD (EMA/SMA) and VW-MACD (Rolling VWAP fast/slow).
Compare mode: A/B Classic vs VW-MACD with a VW ghost ribbon.
Weakness-Lite (1-bar, adaptive): Gates/fades low-participation crosses using
RVOL deficit, Effort-vs-Result failure, and over-extension vs value/ATR (Strict adds wick pressure).
Expansion-Only (Impulse/Squeeze): Triangles print only when a cross coincides with a true-range burst and a histogram-slope ignition out of compression.
Signal hygiene: ±1-bar proximity around crosses, slope awareness, 2-bar debounce.
Explainable filtering: Tiny gray dots show crosses that were intentionally filtered (weak and/or no expansion).
How to use:
Use defaults: Mode Classic, Gate by Weakness ON, Expansion-Only ON, Sensitivity Auto.
Read signals fast:
Solid triangle = cross + expansion confirmed (+ not weak if gate is ON).
Faded triangle = cross + expansion but weak participation (visible only when gate is OFF).
Gray dot = there was a cross, but it was filtered (no genuine expansion or weak & gated).
Validate quickly: Flip Compare to check VW-MACD agreement. Classic + VW alignment usually improves confidence.
Why overlay > sub-pane oscillator
You see where the cross occurs: relative to value, local structure, and S/R, right on price.
The ribbon exposes regime shifts; tint hints expansion vs contraction at a glance.
Execution becomes more context-aware and less “signal-in-a-vacuum.”
Signals & visuals
Triangles (solid): MACD crossed Signal and market showed expansion out of compression; if Gate by Weakness is ON, triangle prints only with acceptable participation.
Triangles (faded): Same as above but weak (shown only when you turn the gate OFF).
Gray dots: Crosses that were filtered (no expansion and/or Weakness gate).
Ribbon: Fast vs Slow value (Classic or VW, according to Mode). Fill and candle tint reflect expansion/contraction.
Inputs
Calculation Mode: Classic | VW | Compare
VW uses Rolling VWAP fast/slow.
Compare: Classic is primary; VW shows as a ghost ribbon for A/B checks.
Gate triangles by Weakness: ON/OFF
Uses RVOL, Effort-vs-Result, extension vs value/ATR (Strict adds wick-pressure).
Sensitivity: Off / Auto / Strict (default Auto).
Expansion-Only (Impulse/Squeeze): ON/OFF
Requires compression → release: tight ribbon + flat momentum, then TR/ATR burst with hist slope flip / cross proximity.
Display: Ribbon / Candle Tint / Weakness Markers.
Advanced (optional): Evaluate Weakness only near signals, Channel (k × |MACD|), Style Preset.
No numeric thresholds to tune—all filters self-calibrate from rolling stats.
Best practices
4H crypto: Defaults are strong—Auto, Gate ON, Expansion-Only ON.
Clean trends: If you feel you miss some tidy resumptions, briefly toggle Expansion-Only OFF.
Choppy regimes: Set Sensitivity → Strict to cut more noise without adding lag.
Confirmation: Use Compare; Classic + VW alignment typically yields better follow-through.
Alerts
MACD Signal Cross Up/Down — execution-grade (use Once per bar close).
Weakness-Lite Flag — optional context alert to help audit filtered crosses.
Attribution & License
Attribution: Based on the algorithmic concept of TradingView’s built-in MACD (fast MA – slow MA, signal, histogram).
No original TradingView source code is redistributed; overlay rendering, VW-MACD, Weakness-Lite, Expansion-Only, gating visuals, and UX are new work.
License: MPL-2.0. Educational purposes only—not financial advice.
MACD Overlay v1 doesn’t just plot an oscillator somewhere below—
it puts value, momentum, and participation on your candles, and it refuses to fire inside chop.
When a triangle prints, it’s because energy released (expansion), not because the chart looked cute.
What it is:
An execution-ready MACD overlay with phase gating (Expansion-Only), participation gating (Weakness-Lite), and one-click Classic vs VW-MACD Compare—all adaptive, with minimal inputs.
What’s in v1 (feature set)
Overlay ribbon on price: Fast/Slow MACD value rendered as a price-level ribbon with contextual fill and optional candle tint.
Dual value model: Classic MA-MACD (EMA/SMA) and VW-MACD (Rolling VWAP fast/slow).
Compare mode: A/B Classic vs VW-MACD with a VW ghost ribbon.
Weakness-Lite (1-bar, adaptive): Gates/fades low-participation crosses using
RVOL deficit, Effort-vs-Result failure, and over-extension vs value/ATR (Strict adds wick pressure).
Expansion-Only (Impulse/Squeeze): Triangles print only when a cross coincides with a true-range burst and a histogram-slope ignition out of compression.
Signal hygiene: ±1-bar proximity around crosses, slope awareness, 2-bar debounce.
Explainable filtering: Tiny gray dots show crosses that were intentionally filtered (weak and/or no expansion).
How to use:
Use defaults: Mode Classic, Gate by Weakness ON, Expansion-Only ON, Sensitivity Auto.
Read signals fast:
Solid triangle = cross + expansion confirmed (+ not weak if gate is ON).
Faded triangle = cross + expansion but weak participation (visible only when gate is OFF).
Gray dot = there was a cross, but it was filtered (no genuine expansion or weak & gated).
Validate quickly: Flip Compare to check VW-MACD agreement. Classic + VW alignment usually improves confidence.
Why overlay > sub-pane oscillator
You see where the cross occurs: relative to value, local structure, and S/R, right on price.
The ribbon exposes regime shifts; tint hints expansion vs contraction at a glance.
Execution becomes more context-aware and less “signal-in-a-vacuum.”
Signals & visuals
Triangles (solid): MACD crossed Signal and market showed expansion out of compression; if Gate by Weakness is ON, triangle prints only with acceptable participation.
Triangles (faded): Same as above but weak (shown only when you turn the gate OFF).
Gray dots: Crosses that were filtered (no expansion and/or Weakness gate).
Ribbon: Fast vs Slow value (Classic or VW, according to Mode). Fill and candle tint reflect expansion/contraction.
Inputs
Calculation Mode: Classic | VW | Compare
VW uses Rolling VWAP fast/slow.
Compare: Classic is primary; VW shows as a ghost ribbon for A/B checks.
Gate triangles by Weakness: ON/OFF
Uses RVOL, Effort-vs-Result, extension vs value/ATR (Strict adds wick-pressure).
Sensitivity: Off / Auto / Strict (default Auto).
Expansion-Only (Impulse/Squeeze): ON/OFF
Requires compression → release: tight ribbon + flat momentum, then TR/ATR burst with hist slope flip / cross proximity.
Display: Ribbon / Candle Tint / Weakness Markers.
Advanced (optional): Evaluate Weakness only near signals, Channel (k × |MACD|), Style Preset.
No numeric thresholds to tune—all filters self-calibrate from rolling stats.
Best practices
4H crypto: Defaults are strong—Auto, Gate ON, Expansion-Only ON.
Clean trends: If you feel you miss some tidy resumptions, briefly toggle Expansion-Only OFF.
Choppy regimes: Set Sensitivity → Strict to cut more noise without adding lag.
Confirmation: Use Compare; Classic + VW alignment typically yields better follow-through.
Alerts
MACD Signal Cross Up/Down — execution-grade (use Once per bar close).
Weakness-Lite Flag — optional context alert to help audit filtered crosses.
Attribution & License
Attribution: Based on the algorithmic concept of TradingView’s built-in MACD (fast MA – slow MA, signal, histogram).
No original TradingView source code is redistributed; overlay rendering, VW-MACD, Weakness-Lite, Expansion-Only, gating visuals, and UX are new work.
License: MPL-2.0. Educational purposes only—not financial advice.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
@jopalgo | [JopAlgo] — Indicators & strategies. Clear rules, no chasing. Education only. Not financial advice.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
@jopalgo | [JopAlgo] — Indicators & strategies. Clear rules, no chasing. Education only. Not financial advice.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.