PineCodersTASC

TASC 2021.10 - MAD Moving Average Difference

Presented here is code for the "Moving Average Difference" indicator originally conceived by John Ehlers, also referred to as MAD. This is one of TradingView's first code releases published in the October 2021 issue of Trader's Tips by Technical Analysis of Stocks & Commodities (TASC) magazine.

This indicator has a companion indicator that is discussed in the article entitled Cycle/Trend Analytics And The MAD Indicator, authored by John Ehlers. He's providing an innovative double dose of indicator code for the month of October 2021.

John Ehlers generally describes it as a "thinking man's" MACD. MAD has similar, yet distinct, intended operation. For those of you familiar with the MACD indicator operation, you will find MACD adjustments having defaults of 12 and 26, while MAD has comparable adjustments with defaults of 8 and 23. These are intended for adjustment, same as any other oscillator.

The MAD indicator can be basically described as two simple moving averages applied within a "rate of change" (ROC) calculation.

Further Related Information
 • SMA
 • ROC

Join TradingView!

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?