OPEN-SOURCE SCRIPT
Growth Comparison (Gold, Silver, Copper, Platinum & Crypto)

Data Sources
The symbols configured this time point to globally trusted data sources (providers).
・OANDA (XAUUSD, XAGUSD, XCUUSD, XPTUSD):
Data from OANDA, one of the world's largest FX and commodity providers. It reflects the “spot prices” for gold, silver, copper, and platinum in near real-time.
・BINANCE (BTCUSDT, ETHUSDT, XRPUSDT):
Data from Binance, the world's largest cryptocurrency exchange. It has the highest trading volume and is used as the global standard price indicator. Retrieves BTC, ETH, and XRP.
How the Script Works (Technical Explanation)
・Fixed Starting Price:
The script internally stores the price on the set “comparison start date” (e.g., January 1, 2025).
・Real-Time Calculation:
It constantly retrieves the latest current price and continuously calculates the percentage using the following formula.
Formula: (Current Price - January 1, 2025 Price) ÷ January 1, 2025 Price × 100
*Since January 1 is a global market holiday (New Year's Day) with no prices available, the script automatically adopts the next market opening price (e.g., January 2 morning's open price) as the baseline.
・Automatic label tracking:
The program displays labels like “GOLD” at the right edge of the graph. This ensures you never lose track of which line corresponds to which asset, even when lines overlap.
Translated with DeepL.com (free version)
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.