OPEN-SOURCE SCRIPT
Updated SILVER (XAGUSD) Targets

📌 AG Target – XAU-Based Silver Target Levels
AG Target is a ratio-based indicator designed to analyze Silver (XAGUSD) using the price of Gold (XAUUSD) as a reference.
The indicator projects dynamic target, support, and resistance levels on the silver chart by dividing the Gold price by historically significant XAU/XAG ratios.
🔍 How It Works
Retrieves XAUUSD (Gold spot price)
Divides it by predefined XAU/XAG ratio levels
Plots the resulting values directly on the XAGUSD chart
Fixed ratio levels used:
44.260
39.628
31.707
These ratios represent historically important zones in the Gold–Silver ratio.
🎨 Visual Logic
Green line → XAG price is above the level
Red line → XAG price is below the level
Line thickness increases with level importance
🚨 Alert System
The indicator includes individual alerts and one combined alert:
Separate alerts for each ratio level crossover
A single combined alert triggers when XAG price crosses any of the target levels
Alerts are triggered only on real cross events, avoiding repeated signals.
🏷️ Label Features
Automatic target labels on the last bar
Toggle labels on/off
Adjustable transparency, size, and horizontal offset
Labels display:
Current target price
Corresponding XAU/XAG ratio
🎯 Who Is This For?
Traders using the Gold–Silver ratio
Macro and ratio-based analysts
Medium to long-term silver traders
Users who prefer clean, objective price levels on their charts
⚠️ Disclaimer
This indicator is not financial advice.
It is designed as a ratio-based reference tool and should be used together with other technical or fundamental analysis methods.
AG Target is a ratio-based indicator designed to analyze Silver (XAGUSD) using the price of Gold (XAUUSD) as a reference.
The indicator projects dynamic target, support, and resistance levels on the silver chart by dividing the Gold price by historically significant XAU/XAG ratios.
🔍 How It Works
Retrieves XAUUSD (Gold spot price)
Divides it by predefined XAU/XAG ratio levels
Plots the resulting values directly on the XAGUSD chart
Fixed ratio levels used:
44.260
39.628
31.707
These ratios represent historically important zones in the Gold–Silver ratio.
🎨 Visual Logic
Green line → XAG price is above the level
Red line → XAG price is below the level
Line thickness increases with level importance
🚨 Alert System
The indicator includes individual alerts and one combined alert:
Separate alerts for each ratio level crossover
A single combined alert triggers when XAG price crosses any of the target levels
Alerts are triggered only on real cross events, avoiding repeated signals.
🏷️ Label Features
Automatic target labels on the last bar
Toggle labels on/off
Adjustable transparency, size, and horizontal offset
Labels display:
Current target price
Corresponding XAU/XAG ratio
🎯 Who Is This For?
Traders using the Gold–Silver ratio
Macro and ratio-based analysts
Medium to long-term silver traders
Users who prefer clean, objective price levels on their charts
⚠️ Disclaimer
This indicator is not financial advice.
It is designed as a ratio-based reference tool and should be used together with other technical or fundamental analysis methods.
Release Notes
Settings have been enhanced.Each target line can now be individually enabled or disabled from the indicator settings.
When a line is disabled, its plot, labels, and alerts are automatically turned off as well.
This update improves visual control and allows users to focus only on the selected target levels.
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.