OPEN-SOURCE SCRIPT
Distance From High %

A lightweight info panel that shows how far the current price has pulled back from its highs — both the all-time high and the high of the currently visible chart range.
What it shows
- Current — the latest close.
- ATH — the highest high across all loaded bars, plus the % distance from current price.
- Visible High — the highest high within the bars currently on screen, plus the % distance. This updates automatically as you pan or zoom.
How to use
Add it to any chart and any timeframe. The Visible High figure recalculates whenever you scroll or change the zoom, making it handy for gauging pullback depth within a specific swing or session without redrawing anything.
Color threshold
The Visible High percentage changes color based on a threshold you set (25% by default). Distances at or above the threshold show in one color, below it in another, giving you an at-a-glance read on how deep the current pullback is. Both colors and the threshold are configurable.
Settings
- Panel position (any of the four corners)
- Right margin, to nudge the panel clear of the price-axis labels
- Show/hide the ATH and Visible High sections independently
- Threshold percentage and the color on each side of it
- Custom label and value text colors
Note
"ATH" is limited to the history your chart and plan have loaded — scroll left to load more bars for a truer all-time high.
What it shows
- Current — the latest close.
- ATH — the highest high across all loaded bars, plus the % distance from current price.
- Visible High — the highest high within the bars currently on screen, plus the % distance. This updates automatically as you pan or zoom.
How to use
Add it to any chart and any timeframe. The Visible High figure recalculates whenever you scroll or change the zoom, making it handy for gauging pullback depth within a specific swing or session without redrawing anything.
Color threshold
The Visible High percentage changes color based on a threshold you set (25% by default). Distances at or above the threshold show in one color, below it in another, giving you an at-a-glance read on how deep the current pullback is. Both colors and the threshold are configurable.
Settings
- Panel position (any of the four corners)
- Right margin, to nudge the panel clear of the price-axis labels
- Show/hide the ATH and Visible High sections independently
- Threshold percentage and the color on each side of it
- Custom label and value text colors
Note
"ATH" is limited to the history your chart and plan have loaded — scroll left to load more bars for a truer all-time high.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire 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 PulseWire. Read more in the Terms of Use.
