Smoothing methods have lag, and since MACD makes use of moving averages, it usually lags behind price. You cannot eliminate lag completely, but one way of working around this is by adding a component of the price/MA difference back to MA. This technique is called Zero-lag (well, almost). "MACD Leader" makes use of this to form a leading signal to MACD.
First proposed by Giorgos E. Siligardos, "Leader" leads normal MACD, especially when significant trend changes are about to take place. This has the following features: - It is similar to MACD in smoothness. - It can be plotted along with MACD in the same window using the same scaling. - It has the ability to lead MACD at critical situations
For detailed discussion on the various divergence patterns, refer to the PDF I have linked in the "More Info" below.
I have provided an option to plot MACD and MACD signal on the same pane. You can enable/disable them via options page.
For Pinescript coders: Try enabling histo on this to compare with normal MACD histo :)