OPEN-SOURCE SCRIPT
Cập nhật BTC / XAU Calculator/Hesaplayıcı

USER GUIDE
BTC/XAU Calculator is a table-based indicator that displays Bitcoin price, Gold price (XAU/USD), and the BTC/XAU ratio simultaneously. It pulls real-time market data and calculates values based on your manual inputs.
⸻
Features
• Automatically fetches live BTCUSD and XAUUSD prices.
• Supports two-way manual calculations:
• BTC price → Ratio calculation
• Ratio → BTC price calculation
• Clear table layout showing Market vs Calculated values.
• Compatible with Binance, OANDA, and all brokers.
⸻
1. Settings
Gold Price (XAU/USD)
• When “Use live XAU price” is enabled, the indicator uses real-time XAU/USD.
• If disabled, you can enter your own gold price manually.
⸻
2. Calculation Modes
A) Calculate BTC from Ratio
BTC = Ratio × Gold price
Example:
XAU = 4200
Ratio = 19.08
→ BTC = 4200 × 19.08 = 80,136 USD
⸻
B) Calculate Ratio from BTC
Ratio = BTC price ÷ Gold price
Example:
BTC = 90,000
XAU = 4250
→ Ratio = 90,000 / 4,250 = 21.18
3. Suggested Uses
• Evaluate BTC as cheap/expensive relative to gold
• BTC target projections based on gold
• Macro hedge and correlation analysis
• BTC/XAU ratio-based scenario modeling
⸻
Notes
• This indicator does not generate trading signals.
• It is intended for numerical comparison and scenario building only.
Source: The design and calculation logic of this indicator were created in collaboration with OpenAI’s ChatGPT model.
Phát hành các Ghi chú
USER GUIDEBTC/XAU Calculator is a table-based indicator that displays Bitcoin price, Gold price (XAU/USD), and the BTC/XAU ratio simultaneously. It pulls real-time market data and calculates values based on your manual inputs.
⸻
Features
• Automatically fetches live BTCUSD and XAUUSD prices.
• Supports two-way manual calculations:
• BTC price → Ratio calculation
• Ratio → BTC price calculation
• Clear table layout showing Market vs Calculated values.
• Compatible with Binance, OANDA, and all brokers.
⸻
1. Settings
Gold Price (XAU/USD)
• When “Use live XAU price” is enabled, the indicator uses real-time XAU/USD.
• If disabled, you can enter your own gold price manually.
⸻
2. Calculation Modes
A) Calculate BTC from Ratio
BTC = Ratio × Gold price
Example:
XAU = 4200
Ratio = 19.08
→ BTC = 4200 × 19.08 = 80,136 USD
⸻
B) Calculate Ratio from BTC
Ratio = BTC price ÷ Gold price
Example:
BTC = 90,000
XAU = 4250
→ Ratio = 90,000 / 4,250 = 21.18
3. Suggested Uses
• Evaluate BTC as cheap/expensive relative to gold
• BTC target projections based on gold
• Macro hedge and correlation analysis
• BTC/XAU ratio-based scenario modeling
⸻
Notes
• This indicator does not generate trading signals.
• It is intended for numerical comparison and scenario building only.
Source: The design and calculation logic of this indicator were created in collaboration with OpenAI’s ChatGPT model.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.