OPEN-SOURCE SCRIPT
Updated Distance to MA

Summary:
Calculate the distance of the price to a moving average. Also be able to identify if the average distance is decreasing or increasing based on signal line.
Details
Length: The moving average length to measure against.
Source: The price input source use to measure the distance from.
Signal Length: The average of distance between Source and MA.
If the average is increasing the color of the signal line will be green and if it is decreasing then it will be red.
Calculate the distance of the price to a moving average. Also be able to identify if the average distance is decreasing or increasing based on signal line.
Details
Length: The moving average length to measure against.
Source: The price input source use to measure the distance from.
Signal Length: The average of distance between Source and MA.
If the average is increasing the color of the signal line will be green and if it is decreasing then it will be red.
Release Notes
The indicator now has the ability to show distance and signal as a percentage from the moving average.Quadrant top left shows distance and signal line from the MA in terms of dollar amount.
Quadrant top left shows distance and signal line from the MA in terms of percentage.
Quadrant bottom left shows distance from MA in terms of dollar amount and signal line from the MA in terms of percentage. This is perhaps the most important measure of strength and also can be an indicator for overbought or oversold levels.
Quadrant bottom right shows distance from MA in terms of percentage and signal line from the MA in terms of dollar amount.
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.
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.
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.