OPEN-SOURCE SCRIPT
Gold Price Cambodian Units - LFT.Trader

This indicator is specifically designed for gold traders and investors in the Cambodian market. It bridges the gap between the global gold market (priced in Troy Ounces) and the local Cambodian measurement system.
It provides a live-updating table on your chart that converts the current XAU/USD price into Damlung (ដំឡឹង), Chi (ជី), and Hun (ហ៊ុន).
Measurement Logic
To ensure accuracy, the script uses the standard international-to-local conversion:
1 Damlung (ដំឡឹង) = 37.5 Grams
1 Troy Ounce ≈ 31.1034768 Grams
1 Damlung ≈ 1.20565 Troy Ounces
1 Damlung = 10 Chi (ជី)
1 Chi = 10 Hun (ហ៊ុន)
Key Features
✅ Live Updates: Calculations refresh instantly with every price movement on the XAUUSD chart.
✅ Dual Currency Display: View prices in both USD and Cambodian Riel (KHR).
✅ Customizable Exchange Rate: Since local market rates for USD/KHR can vary from official bank rates, you can manually set your preferred exchange rate in the settings.
✅ Flexible UI: Choose from 9 different positions on your chart to place the table (Top, Middle, Bottom — Left, Center, Right).
✅ Toggle KHR Column: Hide or show the Riel column depending on your preference.
✅ Clean Formatting: Prices include thousands separators (commas) and decimal points for high-precision viewing.
How to Use
Add the indicator to a Gold (XAUUSD) chart.
Open the Settings to adjust the table position or text size.
Input the current local USD/KHR exchange rate to get an accurate Riel price.
Use the "Show Price (KHR)" checkbox to simplify the table if you only need USD values.
Disclaimer
This tool is for informational purposes only. Local gold shop premiums and spreads may vary. Always verify prices with your local dealer before making financial decisions.
It provides a live-updating table on your chart that converts the current XAU/USD price into Damlung (ដំឡឹង), Chi (ជី), and Hun (ហ៊ុន).
Measurement Logic
To ensure accuracy, the script uses the standard international-to-local conversion:
1 Damlung (ដំឡឹង) = 37.5 Grams
1 Troy Ounce ≈ 31.1034768 Grams
1 Damlung ≈ 1.20565 Troy Ounces
1 Damlung = 10 Chi (ជី)
1 Chi = 10 Hun (ហ៊ុន)
Key Features
✅ Live Updates: Calculations refresh instantly with every price movement on the XAUUSD chart.
✅ Dual Currency Display: View prices in both USD and Cambodian Riel (KHR).
✅ Customizable Exchange Rate: Since local market rates for USD/KHR can vary from official bank rates, you can manually set your preferred exchange rate in the settings.
✅ Flexible UI: Choose from 9 different positions on your chart to place the table (Top, Middle, Bottom — Left, Center, Right).
✅ Toggle KHR Column: Hide or show the Riel column depending on your preference.
✅ Clean Formatting: Prices include thousands separators (commas) and decimal points for high-precision viewing.
How to Use
Add the indicator to a Gold (XAUUSD) chart.
Open the Settings to adjust the table position or text size.
Input the current local USD/KHR exchange rate to get an accurate Riel price.
Use the "Show Price (KHR)" checkbox to simplify the table if you only need USD values.
Disclaimer
This tool is for informational purposes only. Local gold shop premiums and spreads may vary. Always verify prices with your local dealer before making financial decisions.
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.