OPEN-SOURCE SCRIPT

Growth Comparison (Gold, Silver, Copper, Platinum & Crypto)

71

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)

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.