OPEN-SOURCE SCRIPT
Updated Extended from Moving Average

This indicator helps avoid chasing extended stocks by showing every time a stock is too far extended from a selected moving average.
Features:
✔️ selectable moving average and source (high, low, close)
✔️ choose to plot or hide the moving average
✔️ selectable distance to be considered too extended
Features:
✔️ selectable moving average and source (high, low, close)
✔️ choose to plot or hide the moving average
✔️ selectable distance to be considered too extended
Release Notes
Fixed a typo in code affecting the sourceRelease Notes
clean upRelease Notes
New option to create a fill between the closing price and selected moving average when the extension is met. Release Notes
Added functionality to see when price is extended away from the moving average to the downside as well. Release Notes
Added a table to show the distance from the selected moving average. Added the option to select a different time frame for the moving average.
Added alerts.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trusted Pine programmer. Send me a message for script development.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trusted Pine programmer. Send me a message for script development.
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.