OPEN-SOURCE SCRIPT
Live Ratio Tracker & Alert

📊 Live Ratio Tracker & Alert (v6)
Overview
The Live Ratio Tracker & Alert is a powerful utility designed for pairs traders, macro analysts, and investors who monitor the relative strength between two assets. Whether you are tracking the Gold/Silver ratio, BTC/S&P500, or your favorite stock against its sector lead, this tool provides a real-time visual anchor and automated alerts.
Instead of switching back and forth between charts, this indicator calculates the ratio instantly and displays it as a dynamic label that follows the price action.
🚀 Key Features
Real-Time Ratio Calculation: Automatically fetches data from a secondary symbol (e.g., TVC:GOLD) and divides the current chart price by the secondary price.
Dynamic Visual Label: A clean, customizable label appears to the right of the latest candle, showing the live ratio and your set target.
Integrated Alert System: Get notified the moment a specific ratio level is crossed. Supports "Crossing," "Crossing Up," and "Crossing Down" logic.
Fully Customizable UI: Adjust colors, text size, and label offsets to match your chart theme.
Pine Script v6 Optimized: Built using the latest standards for better performance and reliability.
đź“– How to Use
1. Setting Up the Comparison
Open the indicator settings.
In the Compare Against (Denominator) field, type the ticker you want to compare the current chart to (e.g., if you are on BTCUSD and want the BTC/GOLD ratio, enter TVC:GOLD).
Tooltip: Use the search icon to find the exact exchange ticker for the most accurate results.
2. Configuring Alerts
Alert Ratio Level: Enter the decimal value you are watching (e.g., 0.025).
Alert Type: Choose if you want to be notified only when the ratio breaks above, below, or moves in either direction.
Tooltip: After setting the level in the inputs, remember to create a standard TradingView alert and select this indicator as the condition.
3. Customizing the Display
Label Offset: Use this to move the label further to the right so it doesn't overlap with the price action.
Size & Colors: Switch between "Small" or "Huge" text depending on your screen resolution and personal preference.
đź’ˇ Pro Tips for Traders
Relative Strength: Use this to identify which asset is outperforming during a market rally.
Mean Reversion: If the ratio reaches a historical extreme (e.g., Gold/Silver ratio at 100+), use the alert to prepare for a potential reversal trade.
Overlay Mode: This indicator is set to overlay=true, meaning it stays on your main price chart for a clutter-free workspace.
Overview
The Live Ratio Tracker & Alert is a powerful utility designed for pairs traders, macro analysts, and investors who monitor the relative strength between two assets. Whether you are tracking the Gold/Silver ratio, BTC/S&P500, or your favorite stock against its sector lead, this tool provides a real-time visual anchor and automated alerts.
Instead of switching back and forth between charts, this indicator calculates the ratio instantly and displays it as a dynamic label that follows the price action.
🚀 Key Features
Real-Time Ratio Calculation: Automatically fetches data from a secondary symbol (e.g., TVC:GOLD) and divides the current chart price by the secondary price.
Dynamic Visual Label: A clean, customizable label appears to the right of the latest candle, showing the live ratio and your set target.
Integrated Alert System: Get notified the moment a specific ratio level is crossed. Supports "Crossing," "Crossing Up," and "Crossing Down" logic.
Fully Customizable UI: Adjust colors, text size, and label offsets to match your chart theme.
Pine Script v6 Optimized: Built using the latest standards for better performance and reliability.
đź“– How to Use
1. Setting Up the Comparison
Open the indicator settings.
In the Compare Against (Denominator) field, type the ticker you want to compare the current chart to (e.g., if you are on BTCUSD and want the BTC/GOLD ratio, enter TVC:GOLD).
Tooltip: Use the search icon to find the exact exchange ticker for the most accurate results.
2. Configuring Alerts
Alert Ratio Level: Enter the decimal value you are watching (e.g., 0.025).
Alert Type: Choose if you want to be notified only when the ratio breaks above, below, or moves in either direction.
Tooltip: After setting the level in the inputs, remember to create a standard TradingView alert and select this indicator as the condition.
3. Customizing the Display
Label Offset: Use this to move the label further to the right so it doesn't overlap with the price action.
Size & Colors: Switch between "Small" or "Huge" text depending on your screen resolution and personal preference.
đź’ˇ Pro Tips for Traders
Relative Strength: Use this to identify which asset is outperforming during a market rally.
Mean Reversion: If the ratio reaches a historical extreme (e.g., Gold/Silver ratio at 100+), use the alert to prepare for a potential reversal trade.
Overlay Mode: This indicator is set to overlay=true, meaning it stays on your main price chart for a clutter-free workspace.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità . Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilitĂ
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità . Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilitĂ
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.